[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 16:13:04 CET 2014


ffmpeg | branch: release/2.2 | Michael Niedermayer <michaelni at gmx.at> | Wed Oct  8 20:23:40 2014 +0200| [64624c56784dbcec72d02c6e5c474d73cfa92a04] | 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=64624c56784dbcec72d02c6e5c474d73cfa92a04
---

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

diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index 4726e94..37e0d19 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -1903,7 +1903,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