diff options
author | Andreas Cadhalpun <[email protected]> | 2015-04-28 20:31:56 +0200 |
---|---|---|
committer | Michael Niedermayer <[email protected]> | 2015-04-28 20:55:23 +0200 |
commit | ac323fa46330756b60ff4338954de389d268a8fb (patch) | |
tree | 4630b5a64da8b0ccc656d2fd2c590df7bb818da2 /libavformat/nutdec.c | |
parent | 0397e998b3aa90470f023f62e0bb034fa21b631f (diff) |
nutdec: check for negative frame rate in decode_info_header
A negative frame rate triggers an av_assert2 in av_rescale_rnd.
Signed-off-by: Andreas Cadhalpun <[email protected]>
Signed-off-by: Michael Niedermayer <[email protected]>
(cherry picked from commit 6621105877ce0d65724a8ab60b3a50160adbe65d)
Signed-off-by: Michael Niedermayer <[email protected]>
Diffstat (limited to 'libavformat/nutdec.c')
-rw-r--r-- | libavformat/nutdec.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/nutdec.c b/libavformat/nutdec.c index aa7ca676fb..75149693c5 100644 --- a/libavformat/nutdec.c +++ b/libavformat/nutdec.c @@ -534,7 +534,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) + if (st->r_frame_rate.num >= 1000LL*st->r_frame_rate.den || + st->r_frame_rate.num < 0 || st->r_frame_rate.num < 0) st->r_frame_rate.num = st->r_frame_rate.den = 0; continue; } |