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
699699 if (!c->ch_layouts[i].nb_channels) {
700700 char buf[512];
701701 int ret = av_channel_layout_describe(&avctx->ch_layout, buf, sizeof(buf));
702− if (ret > 0)
703− av_log(avctx, AV_LOG_ERROR, "Specified channel layout '%s' is not supported\n", buf);
702+ av_log(avctx, AV_LOG_ERROR, "Specified channel layout '%s' is not supported\n",
703+ ret > 0 ? buf : "?");
704704 return AVERROR(EINVAL);
705705 }
706706 }

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