From 02a0ab41399ce94753e94d1a2229e43d09370463 Mon Sep 17 00:00:00 2001 From: Dan Dennedy Date: Wed, 2 Apr 2014 23:11:19 -0700 Subject: [PATCH] AVStream.r_frame_rate is still useful on FFmpeg (not libav). --- src/modules/avformat/producer_avformat.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/avformat/producer_avformat.c b/src/modules/avformat/producer_avformat.c index 3281dcda..c0b226ef 100644 --- a/src/modules/avformat/producer_avformat.c +++ b/src/modules/avformat/producer_avformat.c @@ -1806,7 +1806,7 @@ static int video_codec_init( producer_avformat self, int index, mlt_properties p #endif double fps = av_q2d( frame_rate ); -#if LIBAVFORMAT_VERSION_MAJOR < 55 +#if LIBAVFORMAT_VERSION_MAJOR < 55 || defined(FFUDIV) // Verify and sanitize the muxer frame rate. if ( isnan( fps ) || isinf( fps ) || fps == 0 ) { @@ -1814,7 +1814,7 @@ static int video_codec_init( producer_avformat self, int index, mlt_properties p fps = av_q2d( frame_rate ); } #endif -#if LIBAVFORMAT_VERSION_INT >= ((52<<16)+(42<<8)+0) && LIBAVFORMAT_VERSION_MAJOR < 55 +#if LIBAVFORMAT_VERSION_INT >= ((52<<16)+(42<<8)+0) && ( LIBAVFORMAT_VERSION_MAJOR < 55 || defined(FFUDIV) ) // With my samples when r_frame_rate != 1000 but avg_frame_rate is valid, // avg_frame_rate gives some approximate value that does not well match the media. // Also, on my sample where r_frame_rate = 1000, using avg_frame_rate directly -- 2.39.2