lavc: drop temporary compat wrappers for channel layout API change

Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
Anton Khirnov
2019-06-04 17:16:02 +02:00
committed by James Almer
parent bfe86a761a
commit 5636972c7a
7 changed files with 1 additions and 105 deletions

View File

@@ -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) {