mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-11-27 13:10:37 +00:00
lavc: do not leak frames in avcodec_decode_audio4
Notwithstanding the return value the frame should be freed if is not going to be used. Reported-by: Matthew Wolenetz <wolenetz@chromium.org>
This commit is contained in:
parent
e0c53c3408
commit
e55e8b2c36
@ -1463,9 +1463,7 @@ int attribute_align_arg avcodec_decode_audio4(AVCodecContext *avctx,
|
||||
frame->extended_buf = NULL;
|
||||
frame->nb_extended_buf = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (ret < 0 && frame->data[0])
|
||||
} else if (frame->data[0])
|
||||
av_frame_unref(frame);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user