diff options
author | Limin Wang <lance.lmwang@gmail.com> | 2021-10-04 11:59:21 +0800 |
---|---|---|
committer | Limin Wang <lance.lmwang@gmail.com> | 2021-10-13 20:12:30 +0800 |
commit | 871fee82e18442b419841234b6722e5b6c3aebcc (patch) | |
tree | a5d01717fbea1538df9183b5de38647528df41a0 | |
parent | f25871d790b77dcce82c33343b87828a176f329b (diff) | |
download | ffmpeg-871fee82e18442b419841234b6722e5b6c3aebcc.tar.gz |
avcodec/videotoolboxenc: use goto end for memory cleanup
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
-rw-r--r-- | libavcodec/videotoolboxenc.c | 2 |
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, |