summaryrefslogtreecommitdiff
path: root/libavcodec/videotoolboxenc.c
diff options
context:
space:
mode:
authorLimin Wang <lance.lmwang@gmail.com>2021-10-04 11:59:21 +0800
committerLimin Wang <lance.lmwang@gmail.com>2021-10-13 20:12:30 +0800
commit871fee82e18442b419841234b6722e5b6c3aebcc (patch)
treea5d01717fbea1538df9183b5de38647528df41a0 /libavcodec/videotoolboxenc.c
parentf25871d790b77dcce82c33343b87828a176f329b (diff)
downloadffmpeg-871fee82e18442b419841234b6722e5b6c3aebcc.tar.gz
avcodec/videotoolboxenc: use goto end for memory cleanup
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Diffstat (limited to 'libavcodec/videotoolboxenc.c')
-rw-r--r--libavcodec/videotoolboxenc.c2
1 files changed, 1 insertions, 1 deletions
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,