mirror of https://github.com/mpv-player/mpv
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.
This commit is contained in:
parent
f5be96a6e5
commit
194e221181
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue