Commit ebfb738f authored by Michael Niedermayer's avatar Michael Niedermayer

nutdec: sanity check r_frame_rate

This fixes files that store a somewhat incorrect value.
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 8b63744f
...@@ -522,6 +522,8 @@ static int decode_info_header(NUTContext *nut) ...@@ -522,6 +522,8 @@ static int decode_info_header(NUTContext *nut)
if (stream_id_plus1 && !strcmp(name, "r_frame_rate")) { if (stream_id_plus1 && !strcmp(name, "r_frame_rate")) {
sscanf(str_value, "%d/%d", &st->r_frame_rate.num, &st->r_frame_rate.den); 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; continue;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment