diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-12-18 04:05:44 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-12-18 14:03:04 +0100 |
commit | ebfb738fa4b0dcefb14586be5d1dc0b44c91d6c2 (patch) | |
tree | ad00199188bb1fec39100effbafcc11c238b6153 /libavformat/nutdec.c | |
parent | 8b63744f483e1f5a5d4f439fc1bbd858232ed581 (diff) | |
download | ffmpeg-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/nutdec.c')
-rw-r--r-- | libavformat/nutdec.c | 2 |
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; } |