diff options
author | wm4 <wm4@nowhere> | 2014-01-20 19:30:38 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-01-20 19:31:23 +0100 |
commit | 0f5e22079a81094e232f30a14800dea6d7561b12 (patch) | |
tree | 82b03db25d21b119fb6616d08ae4ff7036ed96dd | |
parent | 1179676eb4e70f2dffd7031d96026023636a36f6 (diff) | |
download | mpv-0f5e22079a81094e232f30a14800dea6d7561b12.tar.bz2 mpv-0f5e22079a81094e232f30a14800dea6d7561b12.tar.xz |
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.
-rw-r--r-- | common/playlist_parser.c | 16 |
1 files 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"); |