aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-12-18 04:05:44 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-12-18 14:03:04 +0100
commitebfb738fa4b0dcefb14586be5d1dc0b44c91d6c2 (patch)
treead00199188bb1fec39100effbafcc11c238b6153 /libavformat
parent8b63744f483e1f5a5d4f439fc1bbd858232ed581 (diff)
downloadffmpeg-ebfb738fa4b0dcefb14586be5d1dc0b44c91d6c2.tar.gz
nutdec: sanity check r_frame_rate
This fixes files that store a somewhat incorrect value. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/nutdec.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/nutdec.c b/libavformat/nutdec.c
index ac3ef7d909..f260a3e4fd 100644
--- a/libavformat/nutdec.c
+++ b/libavformat/nutdec.c
@@ -522,6 +522,8 @@ static int decode_info_header(NUTContext *nut)
if (stream_id_plus1 && !strcmp(name, "r_frame_rate")) {
sscanf(str_value, "%d/%d", &st->r_frame_rate.num, &st->r_frame_rate.den);
+ if (st->r_frame_rate.num >= 1000LL*st->r_frame_rate.den)
+ st->r_frame_rate.num = st->r_frame_rate.den = 0;
continue;
}