mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-26 17:32:06 +00:00
h264: Fix memory leak on ff_h264_decode_init() failure
CC: libav-devel@libav.org
This commit is contained in:
parent
2e0935965b
commit
56de2897a6
@ -662,8 +662,10 @@ av_cold int ff_h264_decode_init(AVCodecContext *avctx)
|
||||
|
||||
if (avctx->extradata_size > 0 && avctx->extradata) {
|
||||
ret = ff_h264_decode_extradata(h);
|
||||
if (ret < 0)
|
||||
if (ret < 0) {
|
||||
ff_h264_free_context(h);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
if (h->sps.bitstream_restriction_flag &&
|
||||
|
Loading…
Reference in New Issue
Block a user