diff options
author | wm4 <wm4@nowhere> | 2014-01-11 01:28:18 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-03-11 00:07:57 +0100 |
commit | 842689bbf632218eacfd84dfab2b83d6954bdc93 (patch) | |
tree | 3ef00db02d43f4ae24340349f819ca6c338ba811 /sub/sd_lavc.c | |
parent | 5ab2aa84e03ca878a66cc1ce7919edc0ad9b23ed (diff) | |
download | mpv-842689bbf632218eacfd84dfab2b83d6954bdc93.tar.bz2 mpv-842689bbf632218eacfd84dfab2b83d6954bdc93.tar.xz |
sd_lavc: use mp_lavc_set_extradata()
This includes the magical input padding required by libavcodec, which we
possibly didn't do before this commit.
Diffstat (limited to 'sub/sd_lavc.c')
-rw-r--r-- | sub/sd_lavc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sub/sd_lavc.c b/sub/sd_lavc.c index 5a328e3c5f..9f57d9ec38 100644 --- a/sub/sd_lavc.c +++ b/sub/sd_lavc.c @@ -103,8 +103,7 @@ static int init(struct sd *sd) ctx = avcodec_alloc_context3(sub_codec); if (!ctx) goto error; - ctx->extradata_size = sd->extradata_len; - ctx->extradata = sd->extradata; + mp_lavc_set_extradata(ctx, sd->extradata, sd->extradata_len); if (avcodec_open2(ctx, sub_codec, NULL) < 0) goto error; priv->avctx = ctx; @@ -264,6 +263,7 @@ static void uninit(struct sd *sd) clear(priv); avcodec_close(priv->avctx); + av_free(priv->avctx->extradata); av_free(priv->avctx); talloc_free(priv); } |