mirror of https://github.com/mpv-player/mpv
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.
This commit is contained in:
parent
e20b645611
commit
9f5d7d5932
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue