diff --git a/libavutil/audioconvert.c b/libavutil/audioconvert.c index fa27f0168b..d6a4b8a4f2 100644 --- a/libavutil/audioconvert.c +++ b/libavutil/audioconvert.c @@ -91,13 +91,14 @@ void av_get_channel_layout_string(char *buf, int buf_size, snprintf(buf, buf_size, "%d channels", nb_channels); if (channel_layout) { - int i,ch; + int i, ch; av_strlcat(buf, " (", buf_size); - for(i=0,ch=0; i<64; i++) { - if ((channel_layout & (1L<0) av_strlcat(buf, "|", buf_size); + if (ch > 0) + av_strlcat(buf, "|", buf_size); av_strlcat(buf, name, buf_size); } ch++;