From d5702d3b958c967ecac4dec32bff75d723f7ece0 Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 6 Jul 2017 16:12:50 +0200 Subject: ad_lavc, vd_lavc, sd_lavc: consistently use avcodec_free_context() Instead of various ad-hoc ways to achieve the same thing. (The API was added only later.) --- sub/sd_lavc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'sub/sd_lavc.c') 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; } -- cgit v1.2.3