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
12051205
12061206 #if defined (MAC_OS_X_VERSION_10_13) && (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_13)
12071207 if (__builtin_available(macOS 10.13, *)) {
1208+ if (vtctx->supported_props) {
1209+ CFRelease(vtctx->supported_props);
1210+ vtctx->supported_props = NULL;
1211+ }
12081212 status = VTCopySupportedPropertyDictionaryForEncoder(avctx->width,
12091213 avctx->height,
12101214 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