ffmpeg | branch: master | songyutong <[email protected]> | Tue Nov  9 
18:51:58 2021 +0800| [8a969e1280aa7aef31de6bd3db5ce46dc123fde0] | committer: 
Rick Kern

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 <[email protected]>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8a969e1280aa7aef31de6bd3db5ce46dc123fde0
---

 libavcodec/videotoolboxenc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavcodec/videotoolboxenc.c b/libavcodec/videotoolboxenc.c
index bac36fda90..ebaa3ebdc8 100644
--- a/libavcodec/videotoolboxenc.c
+++ b/libavcodec/videotoolboxenc.c
@@ -2554,6 +2554,7 @@ static int vtenc_populate_extradata(AVCodecContext   
*avctx,
 
 
 pe_cleanup:
+    CVPixelBufferRelease(pix_buf);
     if(vtctx->session)
         CFRelease(vtctx->session);
 

_______________________________________________
ffmpeg-cvslog mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".

Reply via email to