summaryrefslogtreecommitdiffstats
path: root/sub/sd_lavc.c
diff options
context:
space:
mode:
Diffstat (limited to 'sub/sd_lavc.c')
-rw-r--r--sub/sd_lavc.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/sub/sd_lavc.c b/sub/sd_lavc.c
index 59e10ab5a9..169a2883df 100644
--- a/sub/sd_lavc.c
+++ b/sub/sd_lavc.c
@@ -113,9 +113,7 @@ static int init(struct sd *sd)
error:
MP_FATAL(sd, "Could not open libavcodec subtitle decoder\n");
- if (ctx)
- av_free(ctx->extradata);
- av_free(ctx);
+ avcodec_free_context(&ctx);
talloc_free(priv);
return -1;
}