Skip to content

Commit

Permalink
sub/lavc_conv: free avctx correctly on error
Browse files Browse the repository at this point in the history
Fixes memory leak on error.
  • Loading branch information
kasper93 committed Dec 28, 2024
1 parent 6632146 commit c566872
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sub/lavc_conv.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit c566872

Please sign in to comment.