avcodec/videotoolboxenc: use goto end for memory cleanup

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
This commit is contained in:
Limin Wang 2021-10-04 11:59:21 +08:00
parent f25871d790
commit 871fee82e1
1 changed files with 1 additions and 1 deletions

View File

@ -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,