Fixes memory leak on error.
Unified · Split
| @@ -107,7 +107,7 @@ struct lavc_conv *lavc_conv_create(struct sd *sd) · 106 unmodified lines | ||
| 107 | 107 | error: |
| 108 | 108 | MP_FATAL(priv, "Could not open libavcodec subtitle converter\n"); |
| 109 | 109 | av_dict_free(&opts); |
| 110 | − av_free(avctx); | |
| 110 | + avcodec_free_context(&avctx); | |
| 111 | 111 | mp_free_av_packet(&priv->avpkt); |
| 112 | 112 | mp_free_av_packet(&priv->avpkt_vtt); |
| 113 | 113 | talloc_free(priv); |