]> git.sesse.net Git - mlt/commitdiff
AVStream.r_frame_rate is still useful on FFmpeg (not libav).
authorDan Dennedy <dan@dennedy.org>
Thu, 3 Apr 2014 06:11:19 +0000 (23:11 -0700)
committerDan Dennedy <dan@dennedy.org>
Thu, 3 Apr 2014 06:12:16 +0000 (23:12 -0700)
src/modules/avformat/producer_avformat.c

index 3281dcdab5f0ec2a8aac8b122ea78a1af11680bf..c0b226ef433880db0f34385ad98bfbd7425ed1c3 100644 (file)
@@ -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