You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
lavc/encoder: always print an error on an unsupported channel layout
Even if the layout is indescribable.
This commit is contained in:
@@ -699,8 +699,8 @@ static int encode_preinit_audio(AVCodecContext *avctx)
|
|||||||
if (!c->ch_layouts[i].nb_channels) {
|
if (!c->ch_layouts[i].nb_channels) {
|
||||||
char buf[512];
|
char buf[512];
|
||||||
int ret = av_channel_layout_describe(&avctx->ch_layout, buf, sizeof(buf));
|
int ret = av_channel_layout_describe(&avctx->ch_layout, buf, sizeof(buf));
|
||||||
if (ret > 0)
|
av_log(avctx, AV_LOG_ERROR, "Specified channel layout '%s' is not supported\n",
|
||||||
av_log(avctx, AV_LOG_ERROR, "Specified channel layout '%s' is not supported\n", buf);
|
ret > 0 ? buf : "?");
|
||||||
return AVERROR(EINVAL);
|
return AVERROR(EINVAL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user