From 7bfa533793cc18eeab9f127e1be795260f6db108 Mon Sep 17 00:00:00 2001 From: Andreas Rheinhardt Date: Tue, 4 May 2021 20:51:09 +0200 Subject: [PATCH] avcodec/v408enc: Deduplicate pix_fmts arrays Signed-off-by: Andreas Rheinhardt --- libavcodec/v408enc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libavcodec/v408enc.c b/libavcodec/v408enc.c index 7024420ca3..e786f71f06 100644 --- a/libavcodec/v408enc.c +++ b/libavcodec/v408enc.c @@ -75,6 +75,8 @@ static int v408_encode_frame(AVCodecContext *avctx, AVPacket *pkt, return 0; } +static const enum AVPixelFormat pix_fmt[] = { AV_PIX_FMT_YUVA444P, AV_PIX_FMT_NONE }; + #if CONFIG_AYUV_ENCODER const AVCodec ff_ayuv_encoder = { .name = "ayuv", @@ -84,7 +86,7 @@ const AVCodec ff_ayuv_encoder = { .capabilities = AV_CODEC_CAP_DR1, .init = v408_encode_init, .encode2 = v408_encode_frame, - .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_YUVA444P, AV_PIX_FMT_NONE }, + .pix_fmts = pix_fmt, .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE, }; #endif @@ -97,7 +99,7 @@ const AVCodec ff_v408_encoder = { .capabilities = AV_CODEC_CAP_DR1, .init = v408_encode_init, .encode2 = v408_encode_frame, - .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_YUVA444P, AV_PIX_FMT_NONE }, + .pix_fmts = pix_fmt, .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE, }; #endif