mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-13 18:40:03 +01:00
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. Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
This commit is contained in:
@@ -1205,6 +1205,10 @@ static int vtenc_create_encoder(AVCodecContext *avctx,
|
|||||||
|
|
||||||
#if defined (MAC_OS_X_VERSION_10_13) && (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_13)
|
#if defined (MAC_OS_X_VERSION_10_13) && (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_13)
|
||||||
if (__builtin_available(macOS 10.13, *)) {
|
if (__builtin_available(macOS 10.13, *)) {
|
||||||
|
if (vtctx->supported_props) {
|
||||||
|
CFRelease(vtctx->supported_props);
|
||||||
|
vtctx->supported_props = NULL;
|
||||||
|
}
|
||||||
status = VTCopySupportedPropertyDictionaryForEncoder(avctx->width,
|
status = VTCopySupportedPropertyDictionaryForEncoder(avctx->width,
|
||||||
avctx->height,
|
avctx->height,
|
||||||
codec_type,
|
codec_type,
|
||||||
|
|||||||
Reference in New Issue
Block a user