changeset 337:8899c3b35b57 libavcodec

* using some small char buffer - needed for sprintf
author kabi
date Mon, 22 Apr 2002 19:57:26 +0000
parents c56b45669214
children 1a38b3b4ea28
files utils.c
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/utils.c	Mon Apr 22 19:04:28 2002 +0000
+++ b/utils.c	Mon Apr 22 19:57:26 2002 +0000
@@ -219,7 +219,7 @@
     const char *codec_name;
     AVCodec *p;
     char buf1[32];
-    char *channels_str=NULL;
+    char channels_str[100];
     int bitrate;
 
     if (encode)
@@ -272,13 +272,13 @@
                  codec_name);
         switch (enc->channels) {
             case 1:
-                channels_str = "mono";
+                strcpy(channels_str, "mono");
                 break;
             case 2:
-                channels_str = "stereo";
+                strcpy(channels_str, "stereo");
                 break;
             case 6:
-                channels_str = "5:1";
+                strcpy(channels_str, "5:1");
                 break;
             default:
                 sprintf(channels_str, "%d channels", enc->channels);