diff options
author | rtogni <rtogni@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2006-11-10 20:35:54 +0000 |
---|---|---|
committer | rtogni <rtogni@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2006-11-10 20:35:54 +0000 |
commit | 7e9859825e64591e2f36ee53a0848c80f4744a74 (patch) | |
tree | c278006cf3e0657b85d038918a4865a417eca728 /playtreeparser.c | |
parent | 46f877b6d48ddd86548e3a6dae1305c3ccafdcbb (diff) | |
download | mpv-7e9859825e64591e2f36ee53a0848c80f4744a74.tar.bz2 mpv-7e9859825e64591e2f36ee53a0848c80f4744a74.tar.xz |
Skip empty lines in front of winamp playlist.
Fixes http://www.radioseven.se/radioseven.pls
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20850 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'playtreeparser.c')
-rw-r--r-- | playtreeparser.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/playtreeparser.c b/playtreeparser.c index 3beae049c2..4786747481 100644 --- a/playtreeparser.c +++ b/playtreeparser.c @@ -251,9 +251,13 @@ parse_pls(play_tree_parser_t* p) { play_tree_t *list = NULL, *entry = NULL, *last_entry = NULL; mp_msg(MSGT_PLAYTREE,MSGL_V,"Trying Winamp playlist...\n"); - if (!(line = play_tree_parser_get_line(p))) + while((line = play_tree_parser_get_line(p))) { + strstrip(line); + if(strlen(line)) + break; + } + if (!line) return NULL; - strstrip(line); if(strcasecmp(line,"[playlist]")) return NULL; mp_msg(MSGT_PLAYTREE,MSGL_V,"Detected Winamp playlist format\n"); |