avcodec/codec_internal, all: Use macros to set deprecated AVCodec fields
The aim of this is twofold: a) Clang warns when setting a deprecated
field in a definition and because several of the widely set
AVCodec fields are deprecated, one gets several hundred warnings
from Clang for an ordinary build. Yet fortunately Clang (unlike GCC)
allows to disable deprecation warnings inside a definition, so
that one can create simple macros to set these fields that also suppress
deprecation warnings for Clang. This has already been done in
fdff1b9cbfd8cf5a9810c29efa4baf13a4786742 for AVCodec.channel_layouts.
b) Using macros will allow to easily migrate these fields to internal ones.
Signed-off-by: Andreas Rheinhardt <[email protected]>
diff --git a/libavcodec/libwebpenc.c b/libavcodec/libwebpenc.c
index 670412c..8ea1bc8 100644
--- a/libavcodec/libwebpenc.c
+++ b/libavcodec/libwebpenc.c
@@ -94,7 +94,7 @@
.p.type = AVMEDIA_TYPE_VIDEO,
.p.id = AV_CODEC_ID_WEBP,
.p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE,
- .p.pix_fmts = ff_libwebpenc_pix_fmts,
+ CODEC_PIXFMTS_ARRAY(ff_libwebpenc_pix_fmts),
.color_ranges = AVCOL_RANGE_MPEG,
.p.priv_class = &ff_libwebpenc_class,
.p.wrapper_name = "libwebp",