diff options
-rw-r--r-- | libavcodec/aacdec.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/aacdec.c b/libavcodec/aacdec.c index d7e0aa57f0..f0c7960d28 100644 --- a/libavcodec/aacdec.c +++ b/libavcodec/aacdec.c @@ -2834,8 +2834,10 @@ static int aac_decode_frame_int(AVCodecContext *avctx, void *data, while ((elem_type = get_bits(gb, 3)) != TYPE_END) { elem_id = get_bits(gb, 4); - if (!avctx->channels && elem_type != TYPE_PCE) + if (!avctx->channels && elem_type != TYPE_PCE) { + err = AVERROR_INVALIDDATA; goto fail; + } if (elem_type < TYPE_DSE) { if (!(che=get_che(ac, elem_type, elem_id))) { |