diff options
author | James Almer <jamrial@gmail.com> | 2024-01-20 12:26:08 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2024-03-07 08:53:30 -0300 |
commit | 65ddc74988245a01421a63c5cffa4d900c47117c (patch) | |
tree | 72bd32783aca75dff15c038cd0a69d724514b31c /libavcodec/avcodec.c | |
parent | a12cd3be98e8aba6e74274192ec6532988aa9444 (diff) | |
download | ffmpeg-65ddc74988245a01421a63c5cffa4d900c47117c.tar.gz |
avutil: remove deprecated FF_API_OLD_CHANNEL_LAYOUT
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/avcodec.c')
-rw-r--r-- | libavcodec/avcodec.c | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/libavcodec/avcodec.c b/libavcodec/avcodec.c index a231bfd689..a9a87bb58c 100644 --- a/libavcodec/avcodec.c +++ b/libavcodec/avcodec.c @@ -241,26 +241,6 @@ int attribute_align_arg avcodec_open2(AVCodecContext *avctx, const AVCodec *code goto free_and_end; } -#if FF_API_OLD_CHANNEL_LAYOUT -FF_DISABLE_DEPRECATION_WARNINGS - /* compat wrapper for old-style callers */ - if (avctx->channel_layout && !avctx->channels) - avctx->channels = av_popcount64(avctx->channel_layout); - - if ((avctx->channels && avctx->ch_layout.nb_channels != avctx->channels) || - (avctx->channel_layout && (avctx->ch_layout.order != AV_CHANNEL_ORDER_NATIVE || - avctx->ch_layout.u.mask != avctx->channel_layout))) { - av_channel_layout_uninit(&avctx->ch_layout); - if (avctx->channel_layout) { - av_channel_layout_from_mask(&avctx->ch_layout, avctx->channel_layout); - } else { - avctx->ch_layout.order = AV_CHANNEL_ORDER_UNSPEC; - } - avctx->ch_layout.nb_channels = avctx->channels; - } -FF_ENABLE_DEPRECATION_WARNINGS -#endif - /* AV_CODEC_CAP_CHANNEL_CONF is a decoder-only flag; so the code below * in particular checks that nb_channels is set for all audio encoders. */ if (avctx->codec_type == AVMEDIA_TYPE_AUDIO && !avctx->ch_layout.nb_channels @@ -345,15 +325,6 @@ FF_ENABLE_DEPRECATION_WARNINGS if (!avctx->bit_rate) avctx->bit_rate = get_bit_rate(avctx); -#if FF_API_OLD_CHANNEL_LAYOUT -FF_DISABLE_DEPRECATION_WARNINGS - /* update the deprecated fields for old-style callers */ - avctx->channels = avctx->ch_layout.nb_channels; - avctx->channel_layout = avctx->ch_layout.order == AV_CHANNEL_ORDER_NATIVE ? - avctx->ch_layout.u.mask : 0; -FF_ENABLE_DEPRECATION_WARNINGS -#endif - /* validate channel layout from the decoder */ if ((avctx->ch_layout.nb_channels && !av_channel_layout_check(&avctx->ch_layout)) || avctx->ch_layout.nb_channels > FF_SANE_NB_CHANNELS) { |