diff options
author | Edgar Hucek <ebsi4711@gmail.com> | 2012-01-29 22:39:38 +0100 |
---|---|---|
committer | Edgar Hucek <ebsi4711@gmail.com> | 2012-01-29 22:39:38 +0100 |
commit | ebbd60ff7043826886cd7c35fde9e06bfe3b5093 (patch) | |
tree | 71a131cf9cb071dfb03f548589f49ddb56ed27bb /src | |
parent | 43bbb26f64916171fbe14aeecd8a8d72741c0dfe (diff) | |
download | xine-lib-ebbd60ff7043826886cd7c35fde9e06bfe3b5093.tar.gz xine-lib-ebbd60ff7043826886cd7c35fde9e06bfe3b5093.tar.bz2 |
fix compile against recent ffmpeg
Diffstat (limited to 'src')
-rw-r--r-- | src/combined/ffmpeg/ff_video_decoder.c | 14 | ||||
-rw-r--r-- | src/combined/ffmpeg/ffmpeg_compat.h | 4 |
2 files changed, 16 insertions, 2 deletions
diff --git a/src/combined/ffmpeg/ff_video_decoder.c b/src/combined/ffmpeg/ff_video_decoder.c index ecfa0a88a..2ec18c55f 100644 --- a/src/combined/ffmpeg/ff_video_decoder.c +++ b/src/combined/ffmpeg/ff_video_decoder.c @@ -130,7 +130,9 @@ struct ff_video_decoder_s { yuv_planes_t yuv; +#ifdef AVPaletteControl AVPaletteControl palette_control; +#endif #ifdef LOG enum PixelFormat debug_fmt; @@ -218,7 +220,9 @@ static int get_buffer(AVCodecContext *context, AVFrame *av_frame){ /* We should really keep track of the ages of xine frames (see * avcodec_default_get_buffer in libavcodec/utils.c) * For the moment tell ffmpeg that every frame is new (age = bignumber) */ +#ifdef AVFRAMEAGE av_frame->age = 256*256*256*64; +#endif av_frame->type= FF_BUFFER_TYPE_USER; @@ -1028,7 +1032,9 @@ static void ff_handle_special_buffer (ff_video_decoder_t *this, buf_element_t *b memcpy(this->context->extradata, buf->decoder_info_ptr[2], buf->decoder_info[2]); - } else if (buf->decoder_info[1] == BUF_SPECIAL_PALETTE) { + } +#ifdef AVPaletteControl + else if (buf->decoder_info[1] == BUF_SPECIAL_PALETTE) { unsigned int i; palette_entry_t *demuxer_palette; @@ -1047,7 +1053,9 @@ static void ff_handle_special_buffer (ff_video_decoder_t *this, buf_element_t *b } decoder_palette->palette_changed = 1; - } else if (buf->decoder_info[1] == BUF_SPECIAL_RV_CHUNK_TABLE) { + } +#endif + else if (buf->decoder_info[1] == BUF_SPECIAL_RV_CHUNK_TABLE) { int i; lprintf("BUF_SPECIAL_RV_CHUNK_TABLE\n"); @@ -1794,7 +1802,9 @@ static video_decoder_t *ff_video_open_plugin (video_decoder_class_t *class_gen, this->av_frame = avcodec_alloc_frame(); this->context = avcodec_alloc_context(); this->context->opaque = this; +#ifdef AVPaletteControl this->context->palctrl = NULL; +#endif this->decoder_ok = 0; this->decoder_init_mode = 1; diff --git a/src/combined/ffmpeg/ffmpeg_compat.h b/src/combined/ffmpeg/ffmpeg_compat.h index 371b5ccdb..69b9aa30e 100644 --- a/src/combined/ffmpeg/ffmpeg_compat.h +++ b/src/combined/ffmpeg/ffmpeg_compat.h @@ -91,5 +91,9 @@ # define AVAUDIO 2 #endif +/* AVFrame.age */ +#if !(LIBAVCODEC_VERSION_MAJOR >= 53 && LIBAVCODEC_VERSION_MAJOR >= 28 && LIBAVCODEC_VERSION_MICRO >= 1) +# define AVFRAMEAGE 1 +#endif #endif /* XINE_AVCODEC_COMPAT_H */ |