| 113 | ERR("Non-audio codec %s has audio-only capabilities set\n"); |
| 114 | } else { |
| 115 | FF_DISABLE_DEPRECATION_WARNINGS |
| 116 | ARRAY_CHECK(supported_samplerates, sample_rate, int, sample_rate == 0, |
| 117 | sample_rate > 0, 1); |
| 118 | ARRAY_CHECK(sample_fmts, sample_fmt, enum AVSampleFormat, sample_fmt == AV_SAMPLE_FMT_NONE, |
| 119 | (unsigned)sample_fmt < AV_SAMPLE_FMT_NB, 1); |
| 120 | static const AVChannelLayout zero_channel_layout = { 0 }; |
| 121 | ARRAY_CHECK(ch_layouts, ch_layout, AVChannelLayout, ch_layout.nb_channels == 0, |
| 122 | av_channel_layout_check(&ch_layout), !memcmp(ptr, &zero_channel_layout, sizeof(ch_layout))); |
| 123 | FF_ENABLE_DEPRECATION_WARNINGS |
| 124 | } |
| 125 | if (codec->type != AVMEDIA_TYPE_VIDEO) { |
| 126 | FF_DISABLE_DEPRECATION_WARNINGS |
| 127 | if (codec->pix_fmts || codec->supported_framerates || |
| 128 | codec2->color_ranges || codec2->alpha_modes) |
| 129 | ERR("Non-video codec %s has video-only fields set\n"); |
| 130 | FF_ENABLE_DEPRECATION_WARNINGS |
| 131 | if (codec2->caps_internal & FF_CODEC_CAP_EXPORTS_CROPPING) |
| 132 | ERR("Non-video codec %s exports cropping\n"); |
| 133 | } |
| 134 | if (codec2->caps_internal & FF_CODEC_CAP_SLICE_THREAD_HAS_MF && |
| 135 | !(codec->capabilities & AV_CODEC_CAP_SLICE_THREADS)) |
| 136 | ERR("Codec %s wants mainfunction despite not being " |