Browse Source

nutdec: sanity check r_frame_rate

This fixes files that store a somewhat incorrect value.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n1.1
Michael Niedermayer 13 years ago
parent
commit
ebfb738fa4
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      libavformat/nutdec.c

+ 2
- 0
libavformat/nutdec.c View File

@@ -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;
}



Loading…
Cancel
Save