mirror of https://git.ffmpeg.org/ffmpeg.git
avcodec/videotoolboxenc: fix pixel buffer memory leak
In function vtenc_populate_extradata(), there is a manually created pixel buffer that has not been released. So we should use CVPixelBufferRelease to release this pixel buffer at the end, otherwise will cause a memory leak. Signed-off-by: Rick Kern <kernrj@gmail.com>
This commit is contained in:
parent
a13646639f
commit
8a969e1280
|
@ -2554,6 +2554,7 @@ static int vtenc_populate_extradata(AVCodecContext *avctx,
|
||||||
|
|
||||||
|
|
||||||
pe_cleanup:
|
pe_cleanup:
|
||||||
|
CVPixelBufferRelease(pix_buf);
|
||||||
if(vtctx->session)
|
if(vtctx->session)
|
||||||
CFRelease(vtctx->session);
|
CFRelease(vtctx->session);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue