From 8e25d940125d48830914eed61fa1854d00b96cb3 Mon Sep 17 00:00:00 2001 From: Darren Salt Date: Thu, 2 Apr 2009 19:43:23 +0100 Subject: Fix up building with libavcodec.so.52 < 52.20.0. --- src/combined/ffmpeg/ff_video_decoder.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/combined/ffmpeg/ff_video_decoder.c b/src/combined/ffmpeg/ff_video_decoder.c index 88a10504b..74299fa0b 100644 --- a/src/combined/ffmpeg/ff_video_decoder.c +++ b/src/combined/ffmpeg/ff_video_decoder.c @@ -1279,7 +1279,15 @@ static void ff_handle_buffer (ff_video_decoder_t *this, buf_element_t *buf) { } /* use externally provided video_step or fall back to stream's time_base otherwise */ - video_step_to_use = (this->video_step || !this->context->time_base.den) ? this->video_step : (int)(90000ll * this->context->ticks_per_frame * this->context->time_base.num / this->context->time_base.den); + video_step_to_use = (this->video_step || !this->context->time_base.den) + ? this->video_step + : (int)(90000ll +#if LIBAVCODEC_VERSION_INT >= 0x341400 + * this->context->ticks_per_frame +#elif LIBAVCODEC_VERSION_INT >= 0x340000 +# warning Building without avcodec ticks_per_frame support; you should upgrade your libavcodec and recompile +#endif + * this->context->time_base.num / this->context->time_base.den); /* aspect ratio provided by ffmpeg, override previous setting */ if ((this->aspect_ratio_prio < 2) && -- cgit v1.2.3