Even if the layout is indescribable.
Showing the changes to libavcodec (1 of 1 file). Show all
Unified · Split
| @@ -699,8 +699,8 @@ static int encode_preinit_audio(AVCodecContext *avctx) · 698 unmodified lines | ||
| 699 | 699 | if (!c->ch_layouts[i].nb_channels) { |
| 700 | 700 | char buf[512]; |
| 701 | 701 | 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 : "?"); | |
| 704 | 704 | return AVERROR(EINVAL); |
| 705 | 705 | } |
| 706 | 706 | } |