avutil: remove deprecated FF_API_OLD_CHANNEL_LAYOUT

Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
James Almer
2024-01-20 12:26:08 -03:00
parent a12cd3be98
commit 65ddc74988
100 changed files with 20 additions and 1792 deletions

View File

@@ -840,24 +840,9 @@ static int new_stream_audio(Muxer *mux, const OptionsContext *o,
}
MATCH_PER_STREAM_OPT(audio_ch_layouts, str, layout, oc, st);
if (layout) {
if (av_channel_layout_from_string(&audio_enc->ch_layout, layout) < 0) {
#if FF_API_OLD_CHANNEL_LAYOUT
uint64_t mask;
AV_NOWARN_DEPRECATED({
mask = av_get_channel_layout(layout);
})
if (!mask) {
#endif
av_log(ost, AV_LOG_FATAL, "Unknown channel layout: %s\n", layout);
return AVERROR(EINVAL);
#if FF_API_OLD_CHANNEL_LAYOUT
}
av_log(ost, AV_LOG_WARNING, "Channel layout '%s' uses a deprecated syntax.\n",
layout);
av_channel_layout_from_mask(&audio_enc->ch_layout, mask);
#endif
}
if (layout && av_channel_layout_from_string(&audio_enc->ch_layout, layout) < 0) {
av_log(ost, AV_LOG_FATAL, "Unknown channel layout: %s\n", layout);
return AVERROR(EINVAL);
}
MATCH_PER_STREAM_OPT(sample_fmts, str, sample_fmt, oc, st);