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:
parent
a13646639f
commit
8a969e1280
@ -2554,6 +2554,7 @@ static int vtenc_populate_extradata(AVCodecContext *avctx,
|
||||
|
||||
|
||||
pe_cleanup:
|
||||
CVPixelBufferRelease(pix_buf);
|
||||
if(vtctx->session)
|
||||
CFRelease(vtctx->session);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user