avcodec/r210enc: Deduplicate pix_fmts arrays

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
pull/362/head
Andreas Rheinhardt 4 years ago
parent 5cb64caadf
commit 184a8852f1
  1. 7
      libavcodec/r210enc.c

@ -86,6 +86,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
return 0;
}
static const enum AVPixelFormat pix_fmt[] = { AV_PIX_FMT_GBRP10, AV_PIX_FMT_NONE };
#if CONFIG_R210_ENCODER
const AVCodec ff_r210_encoder = {
@ -96,7 +97,7 @@ const AVCodec ff_r210_encoder = {
.capabilities = AV_CODEC_CAP_DR1,
.init = encode_init,
.encode2 = encode_frame,
.pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_GBRP10, AV_PIX_FMT_NONE },
.pix_fmts = pix_fmt,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
};
#endif
@ -109,7 +110,7 @@ const AVCodec ff_r10k_encoder = {
.capabilities = AV_CODEC_CAP_DR1,
.init = encode_init,
.encode2 = encode_frame,
.pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_GBRP10, AV_PIX_FMT_NONE },
.pix_fmts = pix_fmt,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
};
#endif
@ -122,7 +123,7 @@ const AVCodec ff_avrp_encoder = {
.capabilities = AV_CODEC_CAP_DR1,
.init = encode_init,
.encode2 = encode_frame,
.pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_GBRP10, AV_PIX_FMT_NONE },
.pix_fmts = pix_fmt,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
};
#endif

Loading…
Cancel
Save