diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-10-06 00:07:28 +0200 |
---|---|---|
committer | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2013-10-24 10:30:33 +0200 |
commit | 6de6d9e2d3eda809cf9b48b94795ae5e012d81de (patch) | |
tree | af0f6c748b1b5c010095cd81f4bfedd958920438 | |
parent | 736851264b7998c0e390f208a2438a1493bdf994 (diff) | |
download | ffmpeg-6de6d9e2d3eda809cf9b48b94795ae5e012d81de.tar.gz |
avformat/matroskadec: only set r_frame_rate if the value is within reasonable limits
Fixes Ticket2451
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 6853e40106cac769f0641183ea0bdd530ae9a0a1)
-rw-r--r-- | libavformat/matroskadec.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index b686eeba75..17726404a0 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -1829,7 +1829,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 } |