diff --git a/source/ui/debug_handler.cpp b/source/ui/debug_handler.cpp index ab03ec3..47ccefe 100644 --- a/source/ui/debug_handler.cpp +++ b/source/ui/debug_handler.cpp @@ -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);