diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2019-09-27 12:12:22 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2019-10-16 19:17:57 +0200 |
commit | ca3d8b471f1b8c7950bd7819757391945a3f4483 (patch) | |
tree | be3df570fbcadcd8c966634a6251b1ae4c8406f5 | |
parent | 8695fbec573b0d434cf2e703a0d45742a09a5d94 (diff) | |
download | ffmpeg-ca3d8b471f1b8c7950bd7819757391945a3f4483.tar.gz |
avcodec/aacdec_template: Check decode_extension_payload() for failure
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavcodec/aacdec_template.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/libavcodec/aacdec_template.c b/libavcodec/aacdec_template.c index 8726c8b828..2faac61a6d 100644 --- a/libavcodec/aacdec_template.c +++ b/libavcodec/aacdec_template.c @@ -3246,9 +3246,15 @@ static int aac_decode_frame_int(AVCodecContext *avctx, void *data, err = AVERROR_INVALIDDATA; goto fail; } - while (elem_id > 0) - elem_id -= decode_extension_payload(ac, gb, elem_id, che_prev, che_prev_type); - err = 0; /* FIXME */ + err = 0; + while (elem_id > 0) { + int ret = decode_extension_payload(ac, gb, elem_id, che_prev, che_prev_type); + if (ret < 0) { + err = ret; + break; + } + elem_id -= ret; + } break; default: |