History

avcodec/tests/avcodec: Silence deprecation warnings

Andreas Rheinhardt committed 1 year ago

Commit bfbceb71 parent c8be3091 file · +6 −0Browse files

Showing the changes to libavcodec/tests/avcodec.c (1 of 1 file). Show all

Unified · Split

libavcodec/tests/avcodec.c+6−0
@@ -77,17 +77,21 @@ int main(void){ · 76 unmodified lines
7777 ERR_EXT("Codec %s has unsupported type %s\n",
7878 get_type_string(codec->type));
7979 if (codec->type != AVMEDIA_TYPE_AUDIO) {
80+FF_DISABLE_DEPRECATION_WARNINGS
8081 if (codec->ch_layouts || codec->sample_fmts ||
8182 codec->supported_samplerates)
8283 ERR("Non-audio codec %s has audio-only fields set\n");
84+FF_ENABLE_DEPRECATION_WARNINGS
8385 if (codec->capabilities & (AV_CODEC_CAP_SMALL_LAST_FRAME |
8486 AV_CODEC_CAP_CHANNEL_CONF |
8587 AV_CODEC_CAP_VARIABLE_FRAME_SIZE))
8688 ERR("Non-audio codec %s has audio-only capabilities set\n");
8789 }
8890 if (codec->type != AVMEDIA_TYPE_VIDEO) {
91+FF_DISABLE_DEPRECATION_WARNINGS
8992 if (codec->pix_fmts || codec->supported_framerates)
9093 ERR("Non-video codec %s has video-only fields set\n");
94+FF_ENABLE_DEPRECATION_WARNINGS
9195 if (codec2->caps_internal & FF_CODEC_CAP_EXPORTS_CROPPING)
9296 ERR("Non-video codec %s exports cropping\n");
9397 }
@@ -136,10 +140,12 @@ int main(void){ · 42 unmodified lines
136140 if (codec2->update_thread_context || codec2->update_thread_context_for_user || codec2->bsfs)
137141 ERR("Encoder %s has decoder-only thread functions or bsf.\n");
138142 if (codec->type == AVMEDIA_TYPE_AUDIO) {
143+FF_DISABLE_DEPRECATION_WARNINGS
139144 if (!codec->sample_fmts) {
140145 av_log(NULL, AV_LOG_FATAL, "Encoder %s is missing the sample_fmts field\n", codec->name);
141146 ret = 1;
142147 }
148+FF_ENABLE_DEPRECATION_WARNINGS
143149 }
144150 if (codec2->caps_internal & (FF_CODEC_CAP_USES_PROGRESSFRAMES |
145151 FF_CODEC_CAP_SETS_PKT_DTS |

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t