summaryrefslogtreecommitdiff
path: root/libavcodec/encode.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/encode.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/encode.c')
-rw-r--r--libavcodec/encode.c17
1 files changed, 1 insertions, 16 deletions
diff --git a/libavcodec/encode.c b/libavcodec/encode.c
index f9f8879b8e..47fa3ac4bf 100644
--- a/libavcodec/encode.c
+++ b/libavcodec/encode.c
@@ -486,24 +486,9 @@ int ff_encode_preinit(AVCodecContext *avctx)
av_log(avctx, AV_LOG_ERROR, "Specified channel layout '%s' is not supported\n", buf);
return AVERROR(EINVAL);
}
-FF_DISABLE_DEPRECATION_WARNINGS
}
#if FF_API_OLD_CHANNEL_LAYOUT
- else if (avctx->codec->channel_layouts) {
- if (!avctx->channel_layout) {
- av_log(avctx, AV_LOG_WARNING, "Channel layout not specified\n");
- } else {
- for (i = 0; avctx->codec->channel_layouts[i] != 0; i++)
- if (avctx->channel_layout == avctx->codec->channel_layouts[i])
- break;
- if (avctx->codec->channel_layouts[i] == 0) {
- char buf[512];
- av_get_channel_layout_string(buf, sizeof(buf), -1, avctx->channel_layout);
- av_log(avctx, AV_LOG_ERROR, "Specified channel layout '%s' is not supported\n", buf);
- return AVERROR(EINVAL);
- }
- }
- }
+FF_DISABLE_DEPRECATION_WARNINGS
if (avctx->channel_layout && avctx->channels) {
int channels = av_get_channel_layout_nb_channels(avctx->channel_layout);
if (channels != avctx->channels) {