summaryrefslogtreecommitdiff
path: root/libavcodec/avcodec.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2019-06-04 17:16:02 +0200
committerJames Almer <jamrial@gmail.com>2022-03-15 09:42:46 -0300
commit5636972c7acb5a485e1759db478ded70ee9d3832 (patch)
tree2cf11628c865339e88d00bc166c7a229ce931b6f /libavcodec/avcodec.c
parentbfe86a761a969190ad93781ac5126e8c1742300f (diff)
lavc: drop temporary compat wrappers for channel layout API change
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/avcodec.c')
-rw-r--r--libavcodec/avcodec.c29
1 files changed, 0 insertions, 29 deletions
diff --git a/libavcodec/avcodec.c b/libavcodec/avcodec.c
index f3bbbbd722..df26c16c90 100644
--- a/libavcodec/avcodec.c
+++ b/libavcodec/avcodec.c
@@ -137,8 +137,6 @@ static int64_t get_bit_rate(AVCodecContext *ctx)
int attribute_align_arg avcodec_open2(AVCodecContext *avctx, const AVCodec *codec, AVDictionary **options)
{
int ret = 0;
- int orig_channels;
- uint64_t orig_channel_layout;
AVCodecInternal *avci;
if (avcodec_is_open(avctx))
@@ -275,14 +273,6 @@ FF_DISABLE_DEPRECATION_WARNINGS
avctx->ch_layout.nb_channels = avctx->channels;
}
}
-
- /* temporary compat wrapper for new-style callers and old-style codecs;
- * to be removed once all the codecs have been converted */
- if (avctx->ch_layout.nb_channels) {
- 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
@@ -346,13 +336,6 @@ FF_ENABLE_DEPRECATION_WARNINGS
if (!HAVE_THREADS && !(codec->caps_internal & FF_CODEC_CAP_AUTO_THREADS))
avctx->thread_count = 1;
-#if FF_API_OLD_CHANNEL_LAYOUT
-FF_DISABLE_DEPRECATION_WARNINGS
- orig_channels = avctx->channels;
- orig_channel_layout = avctx->channel_layout;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
-
if (!(avctx->active_thread_type & FF_THREAD_FRAME) ||
avci->frame_thread_encoder) {
if (avctx->codec->init) {
@@ -375,18 +358,6 @@ FF_ENABLE_DEPRECATION_WARNINGS
#if FF_API_OLD_CHANNEL_LAYOUT
FF_DISABLE_DEPRECATION_WARNINGS
- /* decoder setting the old-style fields */
- if (avctx->channels != orig_channels ||
- avctx->channel_layout != orig_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;
- }
- }
-
/* 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 ?