comparison audioconvert.c @ 9851:e0fe929c5dc4 libavcodec

Do not guess the channel layout when getting its string value.
author jbr
date Sat, 13 Jun 2009 22:33:13 +0000
parents 63dbab428e01
children 01d5e38a0d35
comparison
equal deleted inserted replaced
9850:63dbab428e01 9851:e0fe929c5dc4
121 }; 121 };
122 122
123 void avcodec_get_channel_layout_string(char *buf, int buf_size, int nb_channels, int64_t channel_layout) 123 void avcodec_get_channel_layout_string(char *buf, int buf_size, int nb_channels, int64_t channel_layout)
124 { 124 {
125 int i; 125 int i;
126
127 if (channel_layout==0)
128 channel_layout = avcodec_guess_channel_layout(nb_channels, CODEC_ID_NONE, NULL);
129 126
130 for (i=0; channel_layout_map[i].name; i++) 127 for (i=0; channel_layout_map[i].name; i++)
131 if (nb_channels == channel_layout_map[i].nb_channels && 128 if (nb_channels == channel_layout_map[i].nb_channels &&
132 channel_layout == channel_layout_map[i].layout) { 129 channel_layout == channel_layout_map[i].layout) {
133 av_strlcpy(buf, channel_layout_map[i].name, buf_size); 130 av_strlcpy(buf, channel_layout_map[i].name, buf_size);