summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-05-11 15:44:28 +0200
committerwm4 <wm4@nowhere>2014-05-11 16:40:41 +0200
commit194e22118124b1c10b2634104a98fb2c57eb8981 (patch)
treef8634de719d102c529014068816ffb83d2fc57c4
parentf5be96a6e5e26b6482461e360ddaebb2bbe46393 (diff)
downloadmpv-194e22118124b1c10b2634104a98fb2c57eb8981.tar.bz2
mpv-194e22118124b1c10b2634104a98fb2c57eb8981.tar.xz
demux_playlist: fix m3u detection logic
Caused failure to detect .pls files, because they were misdetected as m3u. The problem is that "forcing playlist files" and "forcing a specific playlist format" are not really treated separate, and in both cases p->force is set to true. This made m3u detect all files as m3u if --playlist was used. So correctly check whether the file format is actually being probed or not.
-rw-r--r--demux/demux_playlist.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/demux/demux_playlist.c b/demux/demux_playlist.c
index f8f763c375..af24d4906f 100644
--- a/demux/demux_playlist.c
+++ b/demux/demux_playlist.c
@@ -69,7 +69,7 @@ static bool pl_eof(struct pl_parser *p)
static int parse_m3u(struct pl_parser *p)
{
bstr line = bstr_strip(pl_get_line(p));
- if (!p->force && !bstr_equals0(line, "#EXTM3U"))
+ if (p->probing && !bstr_equals0(line, "#EXTM3U"))
return -1;
if (p->probing)
return 0;