]> rtime.felk.cvut.cz Git - frescor/ffmpeg.git/commitdiff
Replace snprintf() with av_strlcpy().
authorcehoyos <cehoyos@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Mon, 9 Feb 2009 23:11:26 +0000 (23:11 +0000)
committercehoyos <cehoyos@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Mon, 9 Feb 2009 23:11:26 +0000 (23:11 +0000)
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

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@17110 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

libavcodec/audioconvert.c

index 40a79000fb4db3e0facef5390aa3eb491bbdb6f6..2f2ad8c8dbaad5e72f0cc595aea457fe2bd6325c 100644 (file)
@@ -128,7 +128,7 @@ void avcodec_get_channel_layout_string(char *buf, int buf_size, int nb_channels,
     for (i=0; channel_layout_map[i].name; i++)
         if (nb_channels    == channel_layout_map[i].nb_channels &&
             channel_layout == channel_layout_map[i].layout) {
-            snprintf(buf, buf_size, channel_layout_map[i].name);
+            av_strlcpy(buf, channel_layout_map[i].name, buf_size);
             return;
         }