diff options
author | Kacper Michajłow <kasper93@gmail.com> | 2024-03-23 09:43:30 +0100 |
---|---|---|
committer | Kacper Michajłow <kasper93@gmail.com> | 2024-04-17 23:41:30 +0200 |
commit | 73779a8c706cf5458260f44a9b5c5398a8683fb6 (patch) | |
tree | f0e325f072422425d2220086293f917b3cf6fc44 /sub/lavc_conv.c | |
parent | 1586ccc0c86ab23aad9e3f4b2b5986574ce266a7 (diff) | |
download | mpv-73779a8c706cf5458260f44a9b5c5398a8683fb6.tar.bz2 mpv-73779a8c706cf5458260f44a9b5c5398a8683fb6.tar.xz |
sub/lavc_conv: take sd context as a parameter for lavc_conv_create
Will be useful for future commits.
Diffstat (limited to 'sub/lavc_conv.c')
-rw-r--r-- | sub/lavc_conv.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/sub/lavc_conv.c b/sub/lavc_conv.c index 532e91d508..9513dbf0bb 100644 --- a/sub/lavc_conv.c +++ b/sub/lavc_conv.c @@ -66,13 +66,12 @@ static void disable_styles(bstr header) } } -struct lavc_conv *lavc_conv_create(struct mp_log *log, - const struct mp_codec_params *mp_codec) +struct lavc_conv *lavc_conv_create(struct sd *sd) { struct lavc_conv *priv = talloc_zero(NULL, struct lavc_conv); - priv->log = log; + priv->log = sd->log; priv->cur_list = talloc_array(priv, char*, 0); - priv->codec = talloc_strdup(priv, mp_codec->codec); + priv->codec = talloc_strdup(priv, sd->codec->codec); AVCodecContext *avctx = NULL; AVDictionary *opts = NULL; const char *fmt = get_lavc_format(priv->codec); @@ -82,7 +81,7 @@ struct lavc_conv *lavc_conv_create(struct mp_log *log, avctx = avcodec_alloc_context3(codec); if (!avctx) goto error; - if (mp_set_avctx_codec_headers(avctx, mp_codec) < 0) + if (mp_set_avctx_codec_headers(avctx, sd->codec) < 0) goto error; priv->avpkt = av_packet_alloc(); |