changeset 3574:23d0cdbf3308 libavformat

Use strcmp() instead of strncmp() in set_codec_from_probe_data().
author michael
date Sat, 12 Jul 2008 20:01:23 +0000
parents 9afe7cc51c3f
children 3f8b95c0cc03
files utils.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/utils.c	Sat Jul 12 19:57:57 2008 +0000
+++ b/utils.c	Sat Jul 12 20:01:23 2008 +0000
@@ -299,9 +299,9 @@
     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;