summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-01-19 20:54:00 +0100
committerwm4 <wm4@nowhere>2014-01-19 21:15:55 +0100
commit7c34e0226fb81693e644b613d18b530c15b06505 (patch)
tree84fb5118cfa2eb8e6f48bd801fe972ff4fe2adf1 /common
parentef006dcae6b07a8abb7fed847fd4a9e647109584 (diff)
downloadmpv-7c34e0226fb81693e644b613d18b530c15b06505.tar.bz2
mpv-7c34e0226fb81693e644b613d18b530c15b06505.tar.xz
demux_playlist: move parser for plaintext playlists
This was implemented in playlist_parser.c. To make it use the improved implementation of stream_read_line(), move it to demux_playlist.c.
Diffstat (limited to 'common')
-rw-r--r--common/playlist_parser.c20
1 files changed, 0 insertions, 20 deletions
diff --git a/common/playlist_parser.c b/common/playlist_parser.c
index d871854dbb..0c466a135b 100644
--- a/common/playlist_parser.c
+++ b/common/playlist_parser.c
@@ -364,23 +364,6 @@ static bool parse_smil(play_tree_parser_t* p) {
return true;
}
-static bool parse_textplain(play_tree_parser_t* p) {
- char* line;
-
- MP_VERBOSE(p, "Trying plaintext playlist...\n");
- play_tree_parser_stop_keeping(p);
-
- while((line = play_tree_parser_get_line(p)) != NULL) {
- strstrip(line);
- if(line[0] == '\0' || line[0] == '#' || (line[0] == '/' && line[1] == '/'))
- continue;
-
- playlist_add_file(p->pl,line);
- }
-
- return true;
-}
-
/**
* \brief decode the base64 used in nsc files
* \param in input string, 0-terminated
@@ -524,7 +507,6 @@ static const parser_fn pl_parsers[] = {
parse_asx,
parse_smil,
parse_nsc,
- parse_textplain
};
@@ -548,8 +530,6 @@ static struct playlist *do_parse(struct stream* stream, bool forced,
if (!success && 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] == parse_textplain && !forced)
- break;
if (pl_parsers[n](&p)) {
success = true;
break;