summaryrefslogtreecommitdiff
path: root/libavcodec/libwebpenc_animencoder.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-06-09 01:33:39 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-07-08 20:10:17 +0200
commit19d8077e3172dfac6efd5995903b2ae22cc52744 (patch)
treefadea771d8d1b63b56ccd58fd3fbc88fa9bd635b /libavcodec/libwebpenc_animencoder.c
parent425d272507edbcce458df0064abefd4b02098dfa (diff)
avcodec/libwebpenc: Deduplicate options, AVClass, pix_fmts
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/libwebpenc_animencoder.c')
-rw-r--r--libavcodec/libwebpenc_animencoder.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/libavcodec/libwebpenc_animencoder.c b/libavcodec/libwebpenc_animencoder.c
index 742aefb467..537f1576bd 100644
--- a/libavcodec/libwebpenc_animencoder.c
+++ b/libavcodec/libwebpenc_animencoder.c
@@ -125,29 +125,18 @@ static int libwebp_anim_encode_close(AVCodecContext *avctx)
return 0;
}
-static const AVClass class = {
- .class_name = "libwebp_anim",
- .item_name = av_default_item_name,
- .option = options,
- .version = LIBAVUTIL_VERSION_INT,
-};
-
const AVCodec ff_libwebp_anim_encoder = {
.name = "libwebp_anim",
.long_name = NULL_IF_CONFIG_SMALL("libwebp WebP image"),
.type = AVMEDIA_TYPE_VIDEO,
.id = AV_CODEC_ID_WEBP,
.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY,
+ .pix_fmts = ff_libwebpenc_pix_fmts,
+ .priv_class = &ff_libwebpenc_class,
.priv_data_size = sizeof(LibWebPAnimContext),
+ .defaults = ff_libwebp_defaults,
.init = libwebp_anim_encode_init,
.encode2 = libwebp_anim_encode_frame,
.close = libwebp_anim_encode_close,
- .pix_fmts = (const enum AVPixelFormat[]) {
- AV_PIX_FMT_RGB32,
- AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUVA420P,
- AV_PIX_FMT_NONE
- },
- .priv_class = &class,
- .defaults = libwebp_defaults,
.wrapper_name = "libwebp",
};