From 5178e0ea9af99a09a309b5b43aa1c06bcfeeaa2b Mon Sep 17 00:00:00 2001 From: Jochen Dolze Date: Mon, 15 Jul 2013 15:50:23 +0200 Subject: Added support for ffmpeg 2.0 Prevent wrong setup options to become active --- command/decoder.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'command/decoder.cpp') diff --git a/command/decoder.cpp b/command/decoder.cpp index 4b207a1..ed81b37 100644 --- a/command/decoder.cpp +++ b/command/decoder.cpp @@ -152,7 +152,11 @@ cMarkAdDecoder::cMarkAdDecoder(bool useH264, int Threads) } video_codec=NULL; +#if LIBAVCODEC_VERSION_INT >= ((54<<16)+(51<<8)+100) + AVCodecID video_codecid; +#else CodecID video_codecid; +#endif if (useH264) { @@ -173,7 +177,11 @@ cMarkAdDecoder::cMarkAdDecoder(bool useH264, int Threads) if (video_codec) { +#if LIBAVCODEC_VERSION_INT >= ((54<<16)+(51<<8)+100) + video_context = avcodec_alloc_context3(NULL); +#else video_context = avcodec_alloc_context(); +#endif if (video_context) { if (video_codec->capabilities & CODEC_CAP_TRUNCATED) @@ -323,7 +331,11 @@ bool cMarkAdDecoder::Clear() { avcodec_flush_buffers(video_context); AVCodecContext *dest; +#if LIBAVCODEC_VERSION_INT >= ((54<<16)+(51<<8)+100) + dest=avcodec_alloc_context3(NULL); +#else dest=avcodec_alloc_context(); +#endif if (dest) { if (avcodec_copy_context(dest,video_context)!=0) ret=false; -- cgit v1.2.3