diff options
author | wm4 <wm4@nowhere> | 2016-03-05 00:56:55 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-03-05 00:56:55 +0100 |
commit | fb2f8abaaab604595474e932ff888d73f6f86fc7 (patch) | |
tree | b005d146987696fdae554ba519ca64f309c21868 /demux | |
parent | 740b7013ba827ce5a9d48138af5bd2e8f5d54710 (diff) |
demux_null: fix segfault with --cache enabled
stream->info can be NULL if it's the cache wrapper. To be fair,
stream->info is considered private API anyway. So don't access it, but
check the URL instead.
Diffstat (limited to 'demux')
-rw-r--r-- | demux/demux_null.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/demux/demux_null.c b/demux/demux_null.c index c6a25b5af2..1d4f4df794 100644 --- a/demux/demux_null.c +++ b/demux/demux_null.c @@ -21,7 +21,7 @@ static int try_open_file(struct demuxer *demux, enum demux_check check) { - if (strcmp(demux->stream->info->name, "null") != 0 && + if (!bstr_startswith0(bstr0(demux->filename), "null://") && check != DEMUX_CHECK_REQUEST) return -1; return 0; |