It's non-standard C.
Showing the changes to libavcodec/avcodec.c (1 of 1 file). Show all
Unified · Split
| @@ -708,9 +708,9 @@ int attribute_align_arg avcodec_receive_frame(AVCodecContext *avctx, AVFrame *fr · 707 unmodified lines | |||
| 708 | return ff_encode_receive_frame(avctx, frame); | 708 | return ff_encode_receive_frame(avctx, frame); |
| 709 | } | 709 | } |
| 710 | 710 | ||
| 711 | #define WRAP_CONFIG(allowed_type, field, terminator) \ | 711 | #define WRAP_CONFIG(allowed_type, field, field_type, terminator) \ |
| 712 | do { \ | 712 | do { \ |
| 713 | static const __typeof__(*(field)) end = terminator; \ | 713 | static const field_type end = terminator; \ |
| 714 | if (codec->type != (allowed_type)) \ | 714 | if (codec->type != (allowed_type)) \ |
| 715 | return AVERROR(EINVAL); \ | 715 | return AVERROR(EINVAL); \ |
| 716 | *out_configs = (field); \ | 716 | *out_configs = (field); \ |
| @@ -753,15 +753,15 @@ int ff_default_get_supported_config(const AVCodecContext *avctx, · 36 unmodified lines | |||
| 753 | switch (config) { | 753 | switch (config) { |
| 754 | FF_DISABLE_DEPRECATION_WARNINGS | 754 | FF_DISABLE_DEPRECATION_WARNINGS |
| 755 | case AV_CODEC_CONFIG_PIX_FORMAT: | 755 | case AV_CODEC_CONFIG_PIX_FORMAT: |
| 756 | WRAP_CONFIG(AVMEDIA_TYPE_VIDEO, codec->pix_fmts, AV_PIX_FMT_NONE); | 756 | WRAP_CONFIG(AVMEDIA_TYPE_VIDEO, codec->pix_fmts, enum AVPixelFormat, AV_PIX_FMT_NONE); |
| 757 | case AV_CODEC_CONFIG_FRAME_RATE: | 757 | case AV_CODEC_CONFIG_FRAME_RATE: |
| 758 | WRAP_CONFIG(AVMEDIA_TYPE_VIDEO, codec->supported_framerates, (AVRational){0}); | 758 | WRAP_CONFIG(AVMEDIA_TYPE_VIDEO, codec->supported_framerates, AVRational, {0}); |
| 759 | case AV_CODEC_CONFIG_SAMPLE_RATE: | 759 | case AV_CODEC_CONFIG_SAMPLE_RATE: |
| 760 | WRAP_CONFIG(AVMEDIA_TYPE_AUDIO, codec->supported_samplerates, 0); | 760 | WRAP_CONFIG(AVMEDIA_TYPE_AUDIO, codec->supported_samplerates, int, 0); |
| 761 | case AV_CODEC_CONFIG_SAMPLE_FORMAT: | 761 | case AV_CODEC_CONFIG_SAMPLE_FORMAT: |
| 762 | WRAP_CONFIG(AVMEDIA_TYPE_AUDIO, codec->sample_fmts, AV_SAMPLE_FMT_NONE); | 762 | WRAP_CONFIG(AVMEDIA_TYPE_AUDIO, codec->sample_fmts, enum AVSampleFormat, AV_SAMPLE_FMT_NONE); |
| 763 | case AV_CODEC_CONFIG_CHANNEL_LAYOUT: | 763 | case AV_CODEC_CONFIG_CHANNEL_LAYOUT: |
| 764 | WRAP_CONFIG(AVMEDIA_TYPE_AUDIO, codec->ch_layouts, (AVChannelLayout){0}); | 764 | WRAP_CONFIG(AVMEDIA_TYPE_AUDIO, codec->ch_layouts, AVChannelLayout, {0}); |
| 765 | FF_ENABLE_DEPRECATION_WARNINGS | 765 | FF_ENABLE_DEPRECATION_WARNINGS |
| 766 | 766 | ||
| 767 | case AV_CODEC_CONFIG_COLOR_RANGE: | 767 | case AV_CODEC_CONFIG_COLOR_RANGE: |