History

avcodec/videotoolboxenc: Fix leaking of supported_props

There are two VTCompressionSessionRef been created, one for generating extradata, and another for normal encoding. supported_props was been overwritten without release.

Zhao Zhili committed 2 years ago

Commit 12cdb301 parent 420d4431 file · +4 −0Browse files

Unified · Split

libavcodec/videotoolboxenc.c+4−0
@@ -1205,6 +1205,10 @@ static int vtenc_create_encoder(AVCodecContext *avctx, · 1204 unmodified lines
1205 1205
1206#if defined (MAC_OS_X_VERSION_10_13) && (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_13)1206#if defined (MAC_OS_X_VERSION_10_13) && (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_13)
1207 if (__builtin_available(macOS 10.13, *)) {1207 if (__builtin_available(macOS 10.13, *)) {
1208 if (vtctx->supported_props) {
1209 CFRelease(vtctx->supported_props);
1210 vtctx->supported_props = NULL;
1211 }
1208 status = VTCopySupportedPropertyDictionaryForEncoder(avctx->width,1212 status = VTCopySupportedPropertyDictionaryForEncoder(avctx->width,
1209 avctx->height,1213 avctx->height,
1210 codec_type,1214 codec_type,

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t