aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-10-06 00:07:28 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-10-06 00:22:08 +0200
commit6853e40106cac769f0641183ea0bdd530ae9a0a1 (patch)
tree34afb57f70d81fa5384a5a65fd273160dca863c6
parent746e3142eee4ab4813c2a69b23733d67e1602daa (diff)
downloadffmpeg-6853e40106cac769f0641183ea0bdd530ae9a0a1.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>
-rw-r--r--libavformat/matroskadec.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index 292bd29583..1879328ece 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -1847,7 +1847,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
}