From 7bb75adb600badab63746378f27142cb93c6a2bd Mon Sep 17 00:00:00 2001 From: rtogni Date: Sun, 18 Mar 2007 21:39:52 +0000 Subject: [PATCH] Support multiple tags in a single line and tags on the same line as the signature. Fixes http://www.cartalk.com/Radio/Show/01.smil git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22730 b3059339-0415-0410-9bf9-f77b7e298cf2 --- playtreeparser.c | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/playtreeparser.c b/playtreeparser.c index a2edf5b6a7..a9ebd35b1b 100644 --- a/playtreeparser.c +++ b/playtreeparser.c @@ -474,8 +474,9 @@ parse_smil(play_tree_parser_t* p) { } //Get entries from smil + src_line = line; line = NULL; - while((src_line = play_tree_parser_get_line(p)) != NULL) { + do { strstrip(src_line); if (line) { free(line); @@ -516,26 +517,30 @@ parse_smil(play_tree_parser_t* p) { for (j = i; line[j]; j++) line[j] = line[j+1]; } - if (line[0]=='\0') - continue; + pos = line; + while (pos) { if (!entrymode) { // all entries filled so far - if (strncasecmp(line," 511) { mp_msg(MSGT_PLAYTREE,MSGL_V,"Cannot store such a large source %s\n",line); - continue; + break; } strncpy(source,s_start,s_end-s_start); source[(s_end-s_start)]='\0'; // Null terminate @@ -546,9 +551,11 @@ parse_smil(play_tree_parser_t* p) { else play_tree_append_entry(last_entry,entry); last_entry = entry; + pos = s_end; } } - } + } + } while((src_line = play_tree_parser_get_line(p)) != NULL); if (line) free(line);