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.)
This commit is contained in:
wm4
2017-07-06 16:12:50 +02:00
parent aa2bdec26c
commit d5702d3b95
3 changed files with 3 additions and 15 deletions

View File

@@ -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;
}