summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcantabile <cantabile.desu@gmail.com>2017-04-20 17:06:32 +0300
committerwm4 <wm4@nowhere>2017-04-20 16:11:31 +0200
commit4b4dee09adbb555e794c5fec2733f5fd517885d2 (patch)
tree32abc7443249cdfc9e335c36037afe5f7551206d
parent611426d162e182c2f863993d2b695ae6af2a5486 (diff)
downloadmpv-4b4dee09adbb555e794c5fec2733f5fd517885d2.tar.bz2
mpv-4b4dee09adbb555e794c5fec2733f5fd517885d2.tar.xz
sd_lavc: Free extradata in case of init error
-rw-r--r--sub/sd_lavc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sub/sd_lavc.c b/sub/sd_lavc.c
index 26318cf4b4..59e10ab5a9 100644
--- a/sub/sd_lavc.c
+++ b/sub/sd_lavc.c
@@ -113,6 +113,8 @@ 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);
talloc_free(priv);
return -1;