comparison libmpcodecs/ae_lavc.c @ 21966:d9494ca70ca7

Simplify by using av_codec_get_id and include riff.h only in demux_lavf.c
author reimar
date Sun, 21 Jan 2007 15:44:58 +0000
parents b031f5863b41
children f3d7a1b58a82
comparison
equal deleted inserted replaced
21965:5a2311125dc4 21966:d9494ca70ca7
29 extern int avcodec_inited; 29 extern int avcodec_inited;
30 static int compressed_frame_size = 0; 30 static int compressed_frame_size = 0;
31 #if defined(USE_LIBAVFORMAT) || defined(USE_LIBAVFORMAT_SO) 31 #if defined(USE_LIBAVFORMAT) || defined(USE_LIBAVFORMAT_SO)
32 #ifdef USE_LIBAVFORMAT_SO 32 #ifdef USE_LIBAVFORMAT_SO
33 #include <ffmpeg/avformat.h> 33 #include <ffmpeg/avformat.h>
34 #include <ffmpeg/riff.h>
35 #else 34 #else
36 #include "libavformat/avformat.h" 35 #include "libavformat/avformat.h"
37 #include "libavformat/riff.h" 36 #endif
38 #endif 37 extern const struct AVCodecTag *mp_wav_taglists[];
39 extern const AVCodecTag mp_wav_tags[];
40 #endif 38 #endif
41 39
42 static int bind_lavc(audio_encoder_t *encoder, muxer_stream_t *mux_a) 40 static int bind_lavc(audio_encoder_t *encoder, muxer_stream_t *mux_a)
43 { 41 {
44 mux_a->wf = malloc(sizeof(WAVEFORMATEX)+lavc_actx->extradata_size+256); 42 mux_a->wf = malloc(sizeof(WAVEFORMATEX)+lavc_actx->extradata_size+256);
180 return 0; 178 return 0;
181 } 179 }
182 if(lavc_param_atag == 0) 180 if(lavc_param_atag == 0)
183 { 181 {
184 #if defined(USE_LIBAVFORMAT) || defined(USE_LIBAVFORMAT_SO) 182 #if defined(USE_LIBAVFORMAT) || defined(USE_LIBAVFORMAT_SO)
185 lavc_param_atag = codec_get_wav_tag(lavc_acodec->id); 183 lavc_param_atag = av_codec_get_tag(mp_wav_taglists, lavc_acodec->id);
186 if(!lavc_param_atag)
187 lavc_param_atag = codec_get_tag(mp_wav_tags, lavc_acodec->id);
188 #else 184 #else
189 lavc_param_atag = lavc_find_atag(lavc_param_acodec); 185 lavc_param_atag = lavc_find_atag(lavc_param_acodec);
190 #endif 186 #endif
191 if(!lavc_param_atag) 187 if(!lavc_param_atag)
192 { 188 {