diff options
author | James Almer <jamrial@gmail.com> | 2024-09-08 16:21:41 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2024-09-08 20:33:04 -0300 |
commit | fdf8025eb64c99567eadbebfd488a8e04c028a10 (patch) | |
tree | 6fb401bf6e6003806b6b1316c1c30add2c89a4e0 /libavcodec | |
parent | b4e918221c212a9284dd9074a18abdb6d56dedbe (diff) | |
download | ffmpeg-fdf8025eb64c99567eadbebfd488a8e04c028a10.tar.gz |
avcodec/avcodec: remove usage of __typeof__()
It's non-standard C.
Reviewed-by: Martin Storsjö <martin@martin.st>
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/avcodec.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/libavcodec/avcodec.c b/libavcodec/avcodec.c index cb89236549..8d1a280323 100644 --- a/libavcodec/avcodec.c +++ b/libavcodec/avcodec.c @@ -708,9 +708,9 @@ int attribute_align_arg avcodec_receive_frame(AVCodecContext *avctx, AVFrame *fr return ff_encode_receive_frame(avctx, frame); } -#define WRAP_CONFIG(allowed_type, field, terminator) \ +#define WRAP_CONFIG(allowed_type, field, field_type, terminator) \ do { \ - static const __typeof__(*(field)) end = terminator; \ + static const field_type end = terminator; \ if (codec->type != (allowed_type)) \ return AVERROR(EINVAL); \ *out_configs = (field); \ @@ -753,15 +753,15 @@ int ff_default_get_supported_config(const AVCodecContext *avctx, switch (config) { FF_DISABLE_DEPRECATION_WARNINGS case AV_CODEC_CONFIG_PIX_FORMAT: - WRAP_CONFIG(AVMEDIA_TYPE_VIDEO, codec->pix_fmts, AV_PIX_FMT_NONE); + WRAP_CONFIG(AVMEDIA_TYPE_VIDEO, codec->pix_fmts, enum AVPixelFormat, AV_PIX_FMT_NONE); case AV_CODEC_CONFIG_FRAME_RATE: - WRAP_CONFIG(AVMEDIA_TYPE_VIDEO, codec->supported_framerates, (AVRational){0}); + WRAP_CONFIG(AVMEDIA_TYPE_VIDEO, codec->supported_framerates, AVRational, {0}); case AV_CODEC_CONFIG_SAMPLE_RATE: - WRAP_CONFIG(AVMEDIA_TYPE_AUDIO, codec->supported_samplerates, 0); + WRAP_CONFIG(AVMEDIA_TYPE_AUDIO, codec->supported_samplerates, int, 0); case AV_CODEC_CONFIG_SAMPLE_FORMAT: - WRAP_CONFIG(AVMEDIA_TYPE_AUDIO, codec->sample_fmts, AV_SAMPLE_FMT_NONE); + WRAP_CONFIG(AVMEDIA_TYPE_AUDIO, codec->sample_fmts, enum AVSampleFormat, AV_SAMPLE_FMT_NONE); case AV_CODEC_CONFIG_CHANNEL_LAYOUT: - WRAP_CONFIG(AVMEDIA_TYPE_AUDIO, codec->ch_layouts, (AVChannelLayout){0}); + WRAP_CONFIG(AVMEDIA_TYPE_AUDIO, codec->ch_layouts, AVChannelLayout, {0}); FF_ENABLE_DEPRECATION_WARNINGS case AV_CODEC_CONFIG_COLOR_RANGE: |