From 6da7eb9805657660cc51f75fcd8e2720c03ec1e8 Mon Sep 17 00:00:00 2001 From: Torsten Jager Date: Thu, 11 Apr 2013 20:19:38 +0300 Subject: ff video decoder: made use of AVCodecContext.sub_id conditional --- src/combined/ffmpeg/ff_video_decoder.c | 4 ++-- src/combined/ffmpeg/ffmpeg_compat.h | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/combined/ffmpeg/ff_video_decoder.c b/src/combined/ffmpeg/ff_video_decoder.c index 32497247f..4e2124228 100644 --- a/src/combined/ffmpeg/ff_video_decoder.c +++ b/src/combined/ffmpeg/ff_video_decoder.c @@ -1138,9 +1138,9 @@ static void ff_handle_header_buffer (ff_video_decoder_t *this, buf_element_t *bu 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; diff --git a/src/combined/ffmpeg/ffmpeg_compat.h b/src/combined/ffmpeg/ffmpeg_compat.h index 8b5a48ee1..0a7e0e6f4 100644 --- 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) -- cgit v1.2.3