diff options
author | Anton Khirnov <anton@khirnov.net> | 2023-07-06 18:25:40 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2023-07-11 19:28:18 +0200 |
commit | fc6c746aa17fd4434cf81f045c4644ded02b0912 (patch) | |
tree | cafd4b4456abdf447ad9a8b2aca6732455987107 | |
parent | e026395d22eb217623ae16d3e5592c1e1a2c9336 (diff) | |
download | ffmpeg-fc6c746aa17fd4434cf81f045c4644ded02b0912.tar.gz |
lavc/encoder: always print an error on an unsupported channel layout
Even if the layout is indescribable.
-rw-r--r-- | libavcodec/encode.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/encode.c b/libavcodec/encode.c index fd182007cc..f443f07e15 100644 --- a/libavcodec/encode.c +++ b/libavcodec/encode.c @@ -699,8 +699,8 @@ static int encode_preinit_audio(AVCodecContext *avctx) if (!c->ch_layouts[i].nb_channels) { char buf[512]; 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", buf); + av_log(avctx, AV_LOG_ERROR, "Specified channel layout '%s' is not supported\n", + ret > 0 ? buf : "?"); return AVERROR(EINVAL); } } |