There are two VTCompressionSessionRef been created, one for generating extradata, and another for normal encoding. supported_props was been overwritten without release.
Unified · Split
| @@ -1205,6 +1205,10 @@ static int vtenc_create_encoder(AVCodecContext *avctx, · 1204 unmodified lines | ||
| 1205 | 1205 | |
| 1206 | 1206 | #if defined (MAC_OS_X_VERSION_10_13) && (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_13) |
| 1207 | 1207 | if (__builtin_available(macOS 10.13, *)) { |
| 1208 | + if (vtctx->supported_props) { | |
| 1209 | + CFRelease(vtctx->supported_props); | |
| 1210 | + vtctx->supported_props = NULL; | |
| 1211 | + } | |
| 1208 | 1212 | status = VTCopySupportedPropertyDictionaryForEncoder(avctx->width, |
| 1209 | 1213 | avctx->height, |
| 1210 | 1214 | codec_type, |