aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZdenek Kabelac <kabi@informatics.muni.cz>2002-04-22 19:57:26 +0000
committerZdenek Kabelac <kabi@informatics.muni.cz>2002-04-22 19:57:26 +0000
commit623563c04a8d32b520bb4fed52851338976daa4d (patch)
treee30220a58c2a3a32cb1b2b045369f0f92b889ffd
parent1ff662cc2c542baf7acc3a78ac21e0f19a129320 (diff)
downloadffmpeg-623563c04a8d32b520bb4fed52851338976daa4d.tar.gz
* using some small char buffer - needed for sprintf
Originally committed as revision 416 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavcodec/utils.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index a1df40898f..7240f2096a 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -219,7 +219,7 @@ void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode)
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 @@ void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode)
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);