History

lavc/encoder: always print an error on an unsupported channel layout

Even if the layout is indescribable.

Anton Khirnov committed 3 years ago

Commit fc6c7461 parent e0263951 file · +2 −2Browse files

Unified · Split

libavcodec/encode.c+2−2
@@ -699,8 +699,8 @@ static int encode_preinit_audio(AVCodecContext *avctx) · 698 unmodified lines
699 if (!c->ch_layouts[i].nb_channels) {699 if (!c->ch_layouts[i].nb_channels) {
700 char buf[512];700 char buf[512];
701 int ret = av_channel_layout_describe(&avctx->ch_layout, buf, sizeof(buf));701 int ret = av_channel_layout_describe(&avctx->ch_layout, buf, sizeof(buf));
702 if (ret > 0)702 av_log(avctx, AV_LOG_ERROR, "Specified channel layout '%s' is not supported\n",
703 av_log(avctx, AV_LOG_ERROR, "Specified channel layout '%s' is not supported\n", buf);703 ret > 0 ? buf : "?");
704 return AVERROR(EINVAL);704 return AVERROR(EINVAL);
705 }705 }
706 }706 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t