diff options
-rw-r--r-- | src/combined/ffmpeg/ff_video_decoder.c | 7 | ||||
-rw-r--r-- | src/combined/ffmpeg/ffmpeg_compat.h | 7 |
2 files changed, 11 insertions, 3 deletions
diff --git a/src/combined/ffmpeg/ff_video_decoder.c b/src/combined/ffmpeg/ff_video_decoder.c index 1fdcb158e..1b4b53343 100644 --- a/src/combined/ffmpeg/ff_video_decoder.c +++ b/src/combined/ffmpeg/ff_video_decoder.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2014 the xine project + * Copyright (C) 2001-2015 the xine project * * This file is part of xine, a free video player. * @@ -792,7 +792,10 @@ static void init_video_codec (ff_video_decoder_t *this, unsigned int codec_type) this->context->width = this->bih.biWidth; this->context->height = this->bih.biHeight; - this->context->stream_codec_tag = this->context->codec_tag = +#ifdef AVCODEC_HAS_STREAM_CODEC_TAG + this->context->stream_codec_tag = +#endif + this->context->codec_tag = _x_stream_info_get(this->stream, XINE_STREAM_INFO_VIDEO_FOURCC); diff --git a/src/combined/ffmpeg/ffmpeg_compat.h b/src/combined/ffmpeg/ffmpeg_compat.h index 4d9d66bf0..bd9cd310d 100644 --- a/src/combined/ffmpeg/ffmpeg_compat.h +++ b/src/combined/ffmpeg/ffmpeg_compat.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2000-2014 the xine project + * Copyright (C) 2000-2015 the xine project * * This file is part of xine, a unix video player. * @@ -67,6 +67,11 @@ # define AVCODEC_HAS_SUB_ID #endif +/* not 100% sure about this (between 55.19 and 56.56) */ +#if LIBAVCODEC_VERSION_INT < AV_INT_VERSION(56,0,0) +# define AVCODEC_HAS_STREAM_CODEC_TAG +#endif + /**/ #if LIBAVCODEC_VERSION_INT >= AV_INT_VERSION(53,8,0) # define avcodec_init() do {} while(0) |