1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00

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:
songyutong 2021-11-09 18:51:58 +08:00 committed by Rick Kern
parent a13646639f
commit 8a969e1280

View File

@ -2554,6 +2554,7 @@ static int vtenc_populate_extradata(AVCodecContext *avctx,
pe_cleanup:
CVPixelBufferRelease(pix_buf);
if(vtctx->session)
CFRelease(vtctx->session);