[FFmpeg-cvslog] avcodec/videotoolboxenc: use goto end for memory cleanup

Limin Wang git at videolan.org
Wed Oct 13 15:29:44 EEST 2021


ffmpeg | branch: master | Limin Wang <lance.lmwang at gmail.com> | Mon Oct  4 11:59:21 2021 +0800| [871fee82e18442b419841234b6722e5b6c3aebcc] | committer: Limin Wang

avcodec/videotoolboxenc: use goto end for memory cleanup

Signed-off-by: Limin Wang <lance.lmwang at gmail.com>

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

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

diff --git a/libavcodec/videotoolboxenc.c b/libavcodec/videotoolboxenc.c
index 93c3898fb5..bac36fda90 100644
--- a/libavcodec/videotoolboxenc.c
+++ b/libavcodec/videotoolboxenc.c
@@ -876,7 +876,7 @@ static int create_cv_pixel_buffer_info(AVCodecContext* avctx,
     width_num = CFNumberCreate(kCFAllocatorDefault,
                                kCFNumberSInt32Type,
                                &avctx->width);
-    if (!width_num) return AVERROR(ENOMEM);
+    if (!width_num) goto pbinfo_nomem;
 
     CFDictionarySetValue(pixel_buffer_info,
                          kCVPixelBufferWidthKey,



More information about the ffmpeg-cvslog mailing list