From: Dan Dennedy Date: Thu, 3 Apr 2014 06:11:19 +0000 (-0700) Subject: AVStream.r_frame_rate is still useful on FFmpeg (not libav). X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=02a0ab41399ce94753e94d1a2229e43d09370463;p=mlt AVStream.r_frame_rate is still useful on FFmpeg (not libav). --- 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