diff options
author | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2008-03-14 09:33:38 +0000 |
---|---|---|
committer | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2008-03-14 09:33:38 +0000 |
commit | 99c763d1435736d43c05ddeef30d6afb58b3b674 (patch) | |
tree | 4148bdd751de1f89fd7b30a9c04e2812be9b61b3 /libavcodec/mpeg12.c | |
parent | d04d9e167eb153e924d7aa6ce41250994d7ab5fd (diff) | |
download | ffmpeg-99c763d1435736d43c05ddeef30d6afb58b3b674.tar.gz |
log aspect ratio forbidden value, and fail if error resilience is high
Originally committed as revision 12438 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mpeg12.c')
-rw-r--r-- | libavcodec/mpeg12.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c index 59ed278395..c16adaf606 100644 --- a/libavcodec/mpeg12.c +++ b/libavcodec/mpeg12.c @@ -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; |