Commit 73762b97 authored by bcoudurier's avatar bcoudurier

log aspect ratio forbidden value, and fail if error resilience is high

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@12438 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 6526a4f8
......@@ -1970,6 +1970,11 @@ static int mpeg1_decode_sequence(AVCodecContext *avctx,
(width % 2) != 0 || (height % 2) != 0)
return -1;
s->aspect_ratio_info= get_bits(&s->gb, 4);
if (s->aspect_ratio_info == 0) {
av_log(avctx, AV_LOG_ERROR, "aspect ratio has forbidden 0 value\n");
if (avctx->error_resilience >= FF_ER_COMPLIANT)
return -1;
}
s->frame_rate_index = get_bits(&s->gb, 4);
if (s->frame_rate_index == 0 || s->frame_rate_index > 13)
return -1;
......
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