# HG changeset patch # User bcoudurier # Date 1205487218 0 # Node ID bed080a7ccbde02635a307a8b0d953bce430f6da # Parent 9fc086c2269315bfcae2ec11948fa75687b808ba log aspect ratio forbidden value, and fail if error resilience is high diff -r 9fc086c22693 -r bed080a7ccbd mpeg12.c --- a/mpeg12.c Thu Mar 13 18:26:53 2008 +0000 +++ b/mpeg12.c Fri Mar 14 09:33:38 2008 +0000 @@ -1970,6 +1970,11 @@ (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;