From 0f5e22079a81094e232f30a14800dea6d7561b12 Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 20 Jan 2014 19:30:38 +0100 Subject: playlist_parser: restore ASX parsing etc. This was broken yesterday: the playlist demuxer will always fall back to plaintext playlist files, which will cause the ASX playlist parser and some others never to be called. --- common/playlist_parser.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/common/playlist_parser.c b/common/playlist_parser.c index 0c466a135b..b9c40ea2a1 100644 --- a/common/playlist_parser.c +++ b/common/playlist_parser.c @@ -263,7 +263,7 @@ static bool parse_smil(play_tree_parser_t* p) { } if (!line) return NULL; - MP_VERBOSE(p, "Detected smil playlist format\n"); + MP_VERBOSE(p, "Detected smi l playlist format\n"); play_tree_parser_stop_keeping(p); if (strncasecmp(line,"(smil-document",14)==0) { @@ -521,13 +521,7 @@ static struct playlist *do_parse(struct stream* stream, bool forced, }; bool success = false; - struct demuxer *pl_demux = demux_open(stream, "playlist", NULL, global); - if (pl_demux && pl_demux->playlist) { - playlist_transfer_entries(p.pl, pl_demux->playlist); - success = true; - } - free_demuxer(pl_demux); - if (!success && play_tree_parser_get_line(&p) != NULL) { + if (play_tree_parser_get_line(&p) != NULL) { for (int n = 0; n < sizeof(pl_parsers) / sizeof(pl_parsers[0]); n++) { play_tree_parser_reset(&p); if (pl_parsers[n](&p)) { @@ -536,6 +530,12 @@ static struct playlist *do_parse(struct stream* stream, bool forced, } } } + struct demuxer *pl_demux = demux_open(stream, "playlist", NULL, global); + if (!success && pl_demux && pl_demux->playlist) { + playlist_transfer_entries(p.pl, pl_demux->playlist); + success = true; + } + free_demuxer(pl_demux); if(success) mp_verbose(log, "Playlist successfully parsed\n"); -- cgit v1.2.3