mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-11-24 03:39:45 +00:00
aac: Make sure to set err on the failure path
Bug-Id: CID 1308153
This commit is contained in:
parent
167ea1fbf1
commit
d5eab59a53
@ -2834,8 +2834,10 @@ static int aac_decode_frame_int(AVCodecContext *avctx, void *data,
|
|||||||
while ((elem_type = get_bits(gb, 3)) != TYPE_END) {
|
while ((elem_type = get_bits(gb, 3)) != TYPE_END) {
|
||||||
elem_id = get_bits(gb, 4);
|
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;
|
goto fail;
|
||||||
|
}
|
||||||
|
|
||||||
if (elem_type < TYPE_DSE) {
|
if (elem_type < TYPE_DSE) {
|
||||||
if (!(che=get_che(ac, elem_type, elem_id))) {
|
if (!(che=get_che(ac, elem_type, elem_id))) {
|
||||||
|
Loading…
Reference in New Issue
Block a user