Commit 302f74f9 authored by Ilkka Ollakka's avatar Ilkka Ollakka
Browse files

avcodec: use framerate as time_base seems to be debrecated in 0.56

Libav/ffmpeg seems to store littlebit different values in framerate, so
there is #if to check that. Not sure if it's good idea at all to do that
like this.
parent 4da13fbc
......@@ -180,6 +180,17 @@ static int lavc_UpdateVideoFormat( decoder_t *p_dec, AVCodecContext *p_context,
p_dec->fmt_out.video.i_frame_rate_base =
p_dec->fmt_in.video.i_frame_rate_base;
}
#if LIBAVCODEC_VERSION_CHECK( 56, 5, 0, 7, 100 )
else if( p_context->framerate.num > 0 && p_context->framerate.den > 0 )
{
p_dec->fmt_out.video.i_frame_rate = p_context->framerate.num;
p_dec->fmt_out.video.i_frame_rate_base = p_context->framerate.den;
# if LIBAVCODEC_VERSION_MICRO < 100
// for some reason libav don't thinkg framerate presents actually same thing as in ffmpeg
p_dec->fmt_out.video.i_frame_rate_base *= __MAX( p_context->ticks_per_frame, 1 );
# endif
}
#endif
else if( p_context->time_base.num > 0 && p_context->time_base.den > 0 )
{
p_dec->fmt_out.video.i_frame_rate = p_context->time_base.den;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment