summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTorsten Jager <t.jager@gmx.de>2013-04-11 20:19:38 +0300
committerTorsten Jager <t.jager@gmx.de>2013-04-11 20:19:38 +0300
commit6da7eb9805657660cc51f75fcd8e2720c03ec1e8 (patch)
tree2d9cdad0ace49a87ec1f293e45af75be4dc9cdc7
parent195c3566cd4bdf4d652647cfa731aa557a84cbd4 (diff)
downloadxine-lib-6da7eb9805657660cc51f75fcd8e2720c03ec1e8.tar.gz
xine-lib-6da7eb9805657660cc51f75fcd8e2720c03ec1e8.tar.bz2
ff video decoder: made use of AVCodecContext.sub_id conditional
-rw-r--r--src/combined/ffmpeg/ff_video_decoder.c4
-rw-r--r--src/combined/ffmpeg/ffmpeg_compat.h5
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)