changeset 12538:2beafad68f68

Enhance detection of embedded smil playlist, add embedded ram playlist support Patch by adland
author rtognimp
date Sun, 06 Jun 2004 19:06:39 +0000
parents cbc68f89327d
children 4edbef7dd28d
files playtreeparser.c
diffstat 1 files changed, 8 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/playtreeparser.c	Sun Jun 06 17:11:48 2004 +0000
+++ b/playtreeparser.c	Sun Jun 06 19:06:39 2004 +0000
@@ -558,13 +558,18 @@
     if(line[0] == '\0')
       continue;
 
-    //Special check for smil reference in file
+    //Special check for embedded smil or ram reference in file
     embedded = 0;
     if (strlen(line) > 5)
       for(c = line; c[0]; c++ )
-        if((c[0] == '.') && (tolower(c[1]) == 's') && (tolower(c[2])== 'm') && 
+        if ( ((c[0] == '.') && //start with . and next have smil with optional ? or &
+           (tolower(c[1]) == 's') && (tolower(c[2])== 'm') && 
            (tolower(c[3]) == 'i') && (tolower(c[4]) == 'l') &&
-           (!c[5] || c[5] == '?' || c[5] == '&')) {
+           (!c[5] || c[5] == '?' || c[5] == '&')) || // or
+          ((c[0] == '.') && // start with . and next have smi or ram with optional ? or &
+          ( ((tolower(c[1]) == 's') && (tolower(c[2])== 'm') && (tolower(c[3]) == 'i')) || 
+            ((tolower(c[1]) == 'r') && (tolower(c[2])== 'a') && (tolower(c[3]) == 'm')) )
+           && (!c[4] || c[4] == '?' || c[4] == '&')) ){
           entry=embedded_playlist_parse(line);
           embedded = 1;
           break;