comparison audioconvert.c @ 8784:7c47da8e2cf8 libavcodec

Replace snprintf() with av_strlcpy(). Fixes the following warning on some systems: audioconvert.c:131: warning: format not a string literal and no format arguments Patch by Patrik patrik A yes D nu
author cehoyos
date Mon, 09 Feb 2009 23:11:26 +0000
parents e9d9d946f213
children f7bd7e90ef9f
comparison
equal deleted inserted replaced
8783:e91ea98d868a 8784:7c47da8e2cf8
126 channel_layout = avcodec_guess_channel_layout(nb_channels, CODEC_ID_NONE, NULL); 126 channel_layout = avcodec_guess_channel_layout(nb_channels, CODEC_ID_NONE, NULL);
127 127
128 for (i=0; channel_layout_map[i].name; i++) 128 for (i=0; channel_layout_map[i].name; i++)
129 if (nb_channels == channel_layout_map[i].nb_channels && 129 if (nb_channels == channel_layout_map[i].nb_channels &&
130 channel_layout == channel_layout_map[i].layout) { 130 channel_layout == channel_layout_map[i].layout) {
131 snprintf(buf, buf_size, channel_layout_map[i].name); 131 av_strlcpy(buf, channel_layout_map[i].name, buf_size);
132 return; 132 return;
133 } 133 }
134 134
135 snprintf(buf, buf_size, "%d channels", nb_channels); 135 snprintf(buf, buf_size, "%d channels", nb_channels);
136 if (channel_layout) { 136 if (channel_layout) {