From 39630dc8b6c2241df9e0e6066e1bd858b864f7de Mon Sep 17 00:00:00 2001 From: sfan5 Date: Sat, 1 May 2021 21:53:56 +0200 Subject: build: address AVCodec, AVInputFormat, AVOutputFormat const warnings FFmpeg recently changed these to be const on their side. --- sub/lavc_conv.c | 2 +- sub/sd_lavc.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'sub') diff --git a/sub/lavc_conv.c b/sub/lavc_conv.c index d47b0c4c07..8e1d1aad7f 100644 --- a/sub/lavc_conv.c +++ b/sub/lavc_conv.c @@ -75,7 +75,7 @@ struct lavc_conv *lavc_conv_create(struct mp_log *log, const char *codec_name, AVCodecContext *avctx = NULL; AVDictionary *opts = NULL; const char *fmt = get_lavc_format(priv->codec); - AVCodec *codec = avcodec_find_decoder(mp_codec_to_av_codec_id(fmt)); + const AVCodec *codec = avcodec_find_decoder(mp_codec_to_av_codec_id(fmt)); if (!codec) goto error; avctx = avcodec_alloc_context3(codec); diff --git a/sub/sd_lavc.c b/sub/sd_lavc.c index 77877fdbd1..e8da942a76 100644 --- a/sub/sd_lavc.c +++ b/sub/sd_lavc.c @@ -91,7 +91,7 @@ static int init(struct sd *sd) struct sd_lavc_priv *priv = talloc_zero(NULL, struct sd_lavc_priv); AVCodecContext *ctx = NULL; - AVCodec *sub_codec = avcodec_find_decoder(cid); + const AVCodec *sub_codec = avcodec_find_decoder(cid); if (!sub_codec) goto error; ctx = avcodec_alloc_context3(sub_codec); -- cgit v1.2.3