[FFmpeg-devel] [PATCH v3 02/17] avcodec: add avcodec_get_supported_config()

Anton Khirnov anton at khirnov.net
Mon Sep 2 17:22:21 EEST 2024


Quoting Niklas Haas (2024-08-30 12:15:25)
> diff --git a/libavcodec/avcodec.c b/libavcodec/avcodec.c
> index 6065f1b689..ad25e02613 100644
> --- a/libavcodec/avcodec.c
> +++ b/libavcodec/avcodec.c
> @@ -28,6 +28,7 @@
>  #include "libavutil/avstring.h"
>  #include "libavutil/bprint.h"
>  #include "libavutil/channel_layout.h"
> +#include "libavutil/common.h"
>  #include "libavutil/emms.h"
>  #include "libavutil/fifo.h"
>  #include "libavutil/imgutils.h"
> @@ -706,3 +707,96 @@ int attribute_align_arg avcodec_receive_frame(AVCodecContext *avctx, AVFrame *fr
>          return ff_decode_receive_frame(avctx, frame);
>      return ff_encode_receive_frame(avctx, frame);
>  }
> +
> +#define WRAP_CONFIG(allowed_type, field, terminator)                        \
> +    do {                                                                    \
> +        static const __typeof__(*(field)) sentinel = terminator;            \

We don't allow typeof, it's not in C11. Just pass the type as parameter
to the macro.

-- 
Anton Khirnov


More information about the ffmpeg-devel mailing list