diff options
author | Jan Ekström <jeebjp@gmail.com> | 2023-03-14 23:27:20 +0200 |
---|---|---|
committer | Jan Ekström <jeebjp@gmail.com> | 2023-03-14 23:59:47 +0200 |
commit | 9f5d7d59328bc6d73d06fe67431a3d4ad4ffc2ac (patch) | |
tree | 1b9fdd0a62778088f5d373f0bf956e82d7a2d104 /sub/sd_lavc.c | |
parent | e20b6456110e3f30417764b69f28dd3798d1ca9a (diff) | |
download | mpv-9f5d7d59328bc6d73d06fe67431a3d4ad4ffc2ac.tar.bz2 mpv-9f5d7d59328bc6d73d06fe67431a3d4ad4ffc2ac.tar.xz |
sub/sd_lavc: properly fill avctx with codecpar values at init
Similar reasons as with the previous commit touching lavc_conv,
as well as this being the last location where mp_lavc_set_extradata
being utilized.
Diffstat (limited to 'sub/sd_lavc.c')
-rw-r--r-- | sub/sd_lavc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sub/sd_lavc.c b/sub/sd_lavc.c index 8bbd7b784b..1f7bf76fce 100644 --- a/sub/sd_lavc.c +++ b/sub/sd_lavc.c @@ -99,7 +99,8 @@ static int init(struct sd *sd) priv->avpkt = av_packet_alloc(); if (!priv->avpkt) goto error; - mp_lavc_set_extradata(ctx, sd->codec->extradata, sd->codec->extradata_size); + if (mp_set_avctx_codec_headers(ctx, sd->codec) < 0) + goto error; priv->pkt_timebase = mp_get_codec_timebase(sd->codec); ctx->pkt_timebase = priv->pkt_timebase; if (avcodec_open2(ctx, sub_codec, NULL) < 0) |