diff --git a/sub/lavc_conv.c b/sub/lavc_conv.c index ead5ec2457..eab8762df1 100644 --- a/sub/lavc_conv.c +++ b/sub/lavc_conv.c @@ -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);