[FFmpeg-cvslog] avformat/matroskadec: do not trust the default duration to be the real 1/ timebase if its less than 5fps

Michael Niedermayer git at videolan.org
Sat Nov 1 17:41:15 CET 2014


ffmpeg | branch: release/1.2 | Michael Niedermayer <michaelni at gmx.at> | Wed Oct  8 20:23:40 2014 +0200| [1abb0e563918ffec4c76c12e23f1a0647062a0fe] | committer: Carl Eugen Hoyos

avformat/matroskadec: do not trust the default duration to be the real 1/timebase if its less than 5fps

Fixes Ticket3980

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit be695ee389724d713e1b8a61ef899fe1795193ce)

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1abb0e563918ffec4c76c12e23f1a0647062a0fe
---

 libavformat/matroskadec.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index 1d0f1b2..767fa5e 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -1785,7 +1785,8 @@ static int matroska_read_header(AVFormatContext *s)
                 av_reduce(&st->avg_frame_rate.num, &st->avg_frame_rate.den,
                           1000000000, track->default_duration, 30000);
 #if FF_API_R_FRAME_RATE
-                if (st->avg_frame_rate.num < st->avg_frame_rate.den * 1000L)
+                if (   st->avg_frame_rate.num < st->avg_frame_rate.den * 1000L
+                    && st->avg_frame_rate.num > st->avg_frame_rate.den * 5L)
                     st->r_frame_rate = st->avg_frame_rate;
 #endif
             }



More information about the ffmpeg-cvslog mailing list