summaryrefslogtreecommitdiffstats
path: root/demux/demux_playlist.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-12-04 23:15:31 +0100
committerwm4 <wm4@nowhere>2016-12-04 23:15:31 +0100
commitceb2e1026d4295d3831d080dc18f8ca5db56bc5c (patch)
treeff0bc73ad982c1a1740aa8b1fb31b83fabbe7879 /demux/demux_playlist.c
parent83c5f704e7d483e2db6df90dacd24896d45fe39a (diff)
downloadmpv-ceb2e1026d4295d3831d080dc18f8ca5db56bc5c.tar.bz2
mpv-ceb2e1026d4295d3831d080dc18f8ca5db56bc5c.tar.xz
demux, stream: add option to prevent opening referenced files
Quite irresponsibly hacked together. Sue me.
Diffstat (limited to 'demux/demux_playlist.c')
-rw-r--r--demux/demux_playlist.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/demux/demux_playlist.c b/demux/demux_playlist.c
index 7479db149f..0f2ebedd76 100644
--- a/demux/demux_playlist.c
+++ b/demux/demux_playlist.c
@@ -283,6 +283,8 @@ static int parse_dir(struct pl_parser *p)
return 0;
char *path = mp_file_get_path(p, bstr0(p->real_stream->url));
+ if (!path)
+ return -1;
char **files = NULL;
int num_files = 0;
@@ -339,6 +341,9 @@ static const struct pl_format *probe_pl(struct pl_parser *p)
static int open_file(struct demuxer *demuxer, enum demux_check check)
{
+ if (!demuxer->access_references)
+ return -1;
+
bool force = check < DEMUX_CHECK_UNSAFE || check == DEMUX_CHECK_REQUEST;
struct pl_parser *p = talloc_zero(NULL, struct pl_parser);