summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
authorsfan5 <sfan5@live.de>2021-05-01 21:53:56 +0200
committersfan5 <sfan5@live.de>2021-05-01 22:07:31 +0200
commit39630dc8b6c2241df9e0e6066e1bd858b864f7de (patch)
tree47e41a747f0597b9b3c0d061bef9c3051597684d /video
parent02fbdf8aaffac527ce33c81ace001b48aee9e953 (diff)
downloadmpv-39630dc8b6c2241df9e0e6066e1bd858b864f7de.tar.bz2
mpv-39630dc8b6c2241df9e0e6066e1bd858b864f7de.tar.xz
build: address AVCodec, AVInputFormat, AVOutputFormat const warnings
FFmpeg recently changed these to be const on their side.
Diffstat (limited to 'video')
-rw-r--r--video/image_writer.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/video/image_writer.c b/video/image_writer.c
index fb297f9c0f..cff8609ded 100644
--- a/video/image_writer.c
+++ b/video/image_writer.c
@@ -103,7 +103,7 @@ static bool write_lavc(struct image_writer_ctx *ctx, mp_image_t *image, FILE *fp
av_init_packet(&pkt);
- struct AVCodec *codec;
+ const AVCodec *codec;
if (ctx->opts->format == AV_CODEC_ID_WEBP) {
codec = avcodec_find_encoder_by_name("libwebp"); // non-animated encoder
} else {
@@ -251,7 +251,7 @@ static bool write_jpeg(struct image_writer_ctx *ctx, mp_image_t *image, FILE *fp
#endif
-static int get_encoder_format(struct AVCodec *codec, int srcfmt, bool highdepth)
+static int get_encoder_format(const AVCodec *codec, int srcfmt, bool highdepth)
{
const enum AVPixelFormat *pix_fmts = codec->pix_fmts;
int current = 0;
@@ -277,7 +277,7 @@ static int get_encoder_format(struct AVCodec *codec, int srcfmt, bool highdepth)
static int get_target_format(struct image_writer_ctx *ctx)
{
- struct AVCodec *codec = avcodec_find_encoder(ctx->opts->format);
+ const AVCodec *codec = avcodec_find_encoder(ctx->opts->format);
if (!codec)
goto unknown;