sub/lavc_conv: free avctx correctly on error

Fixes memory leak on error.
This commit is contained in:
Kacper Michajłow committed 2024-12-28 17:52:37 +01:00
1 parent 66321465dc
commit c5668729be
1 file changed
+1 -1
+1 -1
View File
@@ -107,7 +107,7 @@ struct lavc_conv *lavc_conv_create(struct sd *sd)
error:
MP_FATAL(priv, "Could not open libavcodec subtitle converter\n");
av_dict_free(&opts);
av_free(avctx);
avcodec_free_context(&avctx);
mp_free_av_packet(&priv->avpkt);
mp_free_av_packet(&priv->avpkt_vtt);
talloc_free(priv);