]> rtime.felk.cvut.cz Git - frescor/ffmpeg.git/commitdiff
Use strcmp() instead of strncmp() in set_codec_from_probe_data().
authormichael <michael@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Sat, 12 Jul 2008 20:01:23 +0000 (20:01 +0000)
committermichael <michael@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Sat, 12 Jul 2008 20:01:23 +0000 (20:01 +0000)
git-svn-id: file:///var/local/repositories/ffmpeg/trunk@14190 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

libavformat/utils.c

index bf9e5d2aa21f6f2c3d97b2cb7275de8202deff33..3681e117e6c6d42722e4265f2c456bb5dc43b049 100644 (file)
@@ -299,9 +299,9 @@ static int set_codec_from_probe_data(AVStream *st, AVProbeData *pd, int score)
     fmt = av_probe_input_format2(pd, 1, &score);
 
     if (fmt) {
-        if (strncmp(fmt->name, "mp3", 3) == 0)
+        if (!strcmp(fmt->name, "mp3"))
             st->codec->codec_id = CODEC_ID_MP3;
-        else if (strncmp(fmt->name, "ac3", 3) == 0)
+        else if (!strcmp(fmt->name, "ac3"))
             st->codec->codec_id = CODEC_ID_AC3;
         else if (!strcmp(fmt->name, "mpegvideo"))
             st->codec->codec_id = CODEC_ID_MPEG2VIDEO;