diff --git a/tinyDAV/src/codecs/h263/tdav_codec_h263.c b/tinyDAV/src/codecs/h263/tdav_codec_h263.c index bc20b360a..ddbd18b65 100755 --- a/tinyDAV/src/codecs/h263/tdav_codec_h263.c +++ b/tinyDAV/src/codecs/h263/tdav_codec_h263.c @@ -118,7 +118,7 @@ tdav_codec_h263_t; #define TDAV_DECLARE_CODEC_H263 tdav_codec_h263_t __codec_h263__ -static int tdav_codec_h263_init(tdav_codec_h263_t* self, tdav_codec_h263_type_t type, enum CodecID encoder, enum CodecID decoder); +static int tdav_codec_h263_init(tdav_codec_h263_t* self, tdav_codec_h263_type_t type, enum AVCodecID encoder, enum AVCodecID decoder); static int tdav_codec_h263_deinit(tdav_codec_h263_t* self); static int tdav_codec_h263_open_encoder(tdav_codec_h263_t* self); static int tdav_codec_h263_open_decoder(tdav_codec_h263_t* self); @@ -178,7 +178,7 @@ static int tdav_codec_h263_set(tmedia_codec_t* self, const tmedia_param_t* param return -1; } -int tdav_codec_h263_init(tdav_codec_h263_t* self, tdav_codec_h263_type_t type, enum CodecID encoder, enum CodecID decoder) +int tdav_codec_h263_init(tdav_codec_h263_t* self, tdav_codec_h263_type_t type, enum AVCodecID encoder, enum AVCodecID decoder) { int ret = 0; diff --git a/tinyDAV/src/tdav.c b/tinyDAV/src/tdav.c index e264f2bfc..8dca72b05 100755 --- a/tinyDAV/src/tdav.c +++ b/tinyDAV/src/tdav.c @@ -147,6 +147,17 @@ static struct tsk_plugin_s* __dll_plugin_ipsec_wfp = tsk_null; /* IPSec implemen #if HAVE_FFMPEG # include +# if LIBAVCODEC_VERSION_MAJOR >= 54 + AVCodecContext *avcodec_alloc_context(void) { + return avcodec_alloc_context3(NULL); + } + void avcodec_get_context_defaults(AVCodecContext *s) { + avcodec_get_context_defaults3(s, NULL); + } + int avcodec_open(AVCodecContext *avctx, AVCodec *codec) { + return avcodec_open2(avctx, codec, NULL); + } +# endif #endif static inline int _tdav_codec_plugins_collect();