From: Torsten J. <t....@gm...> - 2013-04-11 17:36:27
|
# HG changeset patch # User Torsten Jager <t....@gm...> # Date 1365700778 -10800 # Node ID f132f612296e345d3e8db8fbe1550df6c89848ed # Branch default # Parent d727dfbda8b32c305fe9b0dc4ce2dff39dd7a28a ff video decoder: made use of AVCodecContext.sub_id conditional diff --git a/src/combined/ffmpeg/ff_video_decoder.c b/src/combined/ffmpeg/ff_video_decoder.c --- a/src/combined/ffmpeg/ff_video_decoder.c +++ b/src/combined/ffmpeg/ff_video_decoder.c @@ -1138,9 +1138,9 @@ case BUF_VIDEO_RV40: this->bih.biWidth = _X_BE_16(&this->buf[12]); this->bih.biHeight = _X_BE_16(&this->buf[14]); - +#ifdef AVCODEC_HAS_SUB_ID this->context->sub_id = _X_BE_32(&this->buf[30]); - +#endif this->context->slice_offset = calloc(SLICE_OFFSET_SIZE, sizeof(int)); this->slice_offset_size = SLICE_OFFSET_SIZE; --git a/src/combined/ffmpeg/ffmpeg_compat.h b/src/combined/ffmpeg/ffmpeg_compat.h --- a/src/combined/ffmpeg/ffmpeg_compat.h +++ b/src/combined/ffmpeg/ffmpeg_compat.h @@ -53,6 +53,11 @@ # define AVCODEC_HAS_COLORSPACE #endif +/* "unused" as of v54 */ +#if LIBAVCODEC_VERSION_MAJOR < 54 +# define AVCODEC_HAS_SUB_ID +#endif + /**/ #if LIBAVCODEC_VERSION_MAJOR > 53 || (LIBAVCODEC_VERSION_MAJOR == 53 && LIBAVCODEC_VERSION_MINOR >= 8) # define avcodec_init() do {} while(0) |