From ebfb738fa4b0dcefb14586be5d1dc0b44c91d6c2 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Tue, 18 Dec 2012 04:05:44 +0100 Subject: [PATCH] nutdec: sanity check r_frame_rate This fixes files that store a somewhat incorrect value. Signed-off-by: Michael Niedermayer --- libavformat/nutdec.c | 2 ++ 1 file changed, 2 insertions(+) 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; }