ui/debug_handler: Don't leak the temporary AVCodecContext*

This commit is contained in:
Michael Fabian 'Xaymar' Dirks
2019-07-21 02:41:45 +02:00
parent 8b80dc57ad
commit f15769ddb7
+3 -1
View File
@@ -66,8 +66,10 @@ void obsffmpeg::ui::debug_handler::get_properties(obs_properties_t* props, AVCod
return;
AVCodecContext* ctx = avcodec_alloc_context3(codec);
if (!ctx->priv_data)
if (!ctx->priv_data) {
avcodec_free_context(&ctx);
return;
}
PLOG_INFO("Options for '%s':", codec->name);