[FFmpeg-cvslog] avformat/matroskadec: only set r_frame_rate if the value is within reasonable limits

Michael Niedermayer git at videolan.org
Thu Oct 24 11:59:10 CEST 2013


ffmpeg | branch: release/1.1 | Michael Niedermayer <michaelni at gmx.at> | Sun Oct  6 00:07:28 2013 +0200| [8ffdcd04c481e3357c9df2cad9dbb94fc3d9e0e7] | committer: Carl Eugen Hoyos

avformat/matroskadec: only set r_frame_rate if the value is within reasonable limits

Fixes Ticket2451

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

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

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

diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index 18b41b1..5f5ab91 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -1769,7 +1769,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
-                st->r_frame_rate = st->avg_frame_rate;
+                if (st->avg_frame_rate.num < st->avg_frame_rate.den * 1000L)
+                    st->r_frame_rate = st->avg_frame_rate;
 #endif
             }
 



More information about the ffmpeg-cvslog mailing list