]> git.sesse.net Git - vlc/commitdiff
stream_filter/httplive.c: off by one
authorJean-Paul Saman <jean-paul.saman@m2x.nl>
Fri, 31 Dec 2010 10:13:57 +0000 (11:13 +0100)
committerJean-Paul Saman <jean-paul.saman@m2x.nl>
Fri, 31 Dec 2010 16:55:22 +0000 (17:55 +0100)
Matching #EXT-* keywords was off by one for several.

modules/stream_filter/httplive.c

index 8dffb67e3f7d21565d70c3803de940a8c1aff0cc..4048a951f43b603f80f4629e710f17cb5030d8c4 100644 (file)
@@ -649,13 +649,13 @@ static void parse_M3U8ExtLine(stream_t *s, hls_stream_t *hls, char *line)
     {
         if (strncmp(line, "#EXT-X-TARGETDURATION", 21) == 0)
             parse_TargetDuration(s, hls, line);
-        else if (strncmp(line, "#EXT-X-MEDIA-SEQUENCE", 22) == 0)
+        else if (strncmp(line, "#EXT-X-MEDIA-SEQUENCE", 21) == 0)
             parse_MediaSequence(s, hls, line);
-        else if (strncmp(line, "#EXT-X-KEY", 11) == 0)
+        else if (strncmp(line, "#EXT-X-KEY", 10) == 0)
             parse_Key(s, hls, line);
-        else if (strncmp(line, "#EXT-X-PROGRAM-DATE-TIME", 25) == 0)
+        else if (strncmp(line, "#EXT-X-PROGRAM-DATE-TIME", 24) == 0)
             parse_ProgramDateTime(s, hls, line);
-        else if (strncmp(line, "#EXT-X-ALLOW-CACHE", 17) == 0)
+        else if (strncmp(line, "#EXT-X-ALLOW-CACHE", 18) == 0)
             parse_AllowCache(s, hls, line);
         else if (strncmp(line, "#EXT-X-DISCONTINUITY", 20) == 0)
             parse_Discontinuity(s, hls, line);