[FFmpeg-soc] [soc]: r5188 - in concat/libavformat: pls.c xspf.c

gkovacs subversion at mplayerhq.hu
Thu Aug 20 11:57:33 CEST 2009


Author: gkovacs
Date: Thu Aug 20 11:57:33 2009
New Revision: 5188

Log:
switch back from unrolled string comparison loop to strncmp

Modified:
   concat/libavformat/pls.c
   concat/libavformat/xspf.c

Modified: concat/libavformat/pls.c
==============================================================================
--- concat/libavformat/pls.c	Thu Aug 20 11:23:55 2009	(r5187)
+++ concat/libavformat/pls.c	Thu Aug 20 11:57:33 2009	(r5188)
@@ -60,7 +60,7 @@ static int pls_list_files(ByteIOContext 
             s[2] = s[3];
             s[3] = s[4];
             s[4] = c;
-            if (s[0] == t[0] && s[1] == t[1] && s[2] == t[2] && s[3] == t[3] && s[4] == t[4])
+            if (!strncmp(s, t, 5))
                 state = 1;
         } else if (state == 1) {
             if (c == '=')

Modified: concat/libavformat/xspf.c
==============================================================================
--- concat/libavformat/xspf.c	Thu Aug 20 11:23:55 2009	(r5187)
+++ concat/libavformat/xspf.c	Thu Aug 20 11:57:33 2009	(r5188)
@@ -54,7 +54,7 @@ static int xspf_probe(AVProbeData *p)
             s[2] = s[3];
             s[3] = s[4];
             s[4] = c;
-            if (s[0] == t[0] && s[1] == t[1] && s[2] == t[2] && s[3] == t[3] && s[4] == t[4])
+            if (!strncmp(s, t, 5))
                 fxml = 1;
         }
         if (!ftag) {
@@ -67,8 +67,7 @@ static int xspf_probe(AVProbeData *p)
             u[6] = u[7];
             u[7] = u[8];
             u[8] = c;
-            if (u[0] == v[0] && u[1] == v[1] && u[2] == v[2] && u[3] == v[3] && u[4] == v[4] &&
-                u[5] == v[5] && u[6] == v[6] && u[7] == v[7] && u[8] == v[8])
+            if (!strncmp(u, v, 9))
                 ftag = 1;
         }
     }


More information about the FFmpeg-soc mailing list