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 169a2883df..e805d5c34c 100644
--- a/sub/sd_lavc.c
+++ b/sub/sd_lavc.c
@@ -500,9 +500,7 @@ static void uninit(struct sd *sd)
for (int n = 0; n < MAX_QUEUE; n++)
clear_sub(&priv->subs[n]);
- avcodec_close(priv->avctx);
- av_free(priv->avctx->extradata);
- av_free(priv->avctx);
+ avcodec_free_context(&priv->avctx);
talloc_free(priv);
}