mirror of
https://github.com/mpv-player/mpv
synced 2024-12-26 00:42:57 +00:00
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.
This commit is contained in:
parent
740b7013ba
commit
fb2f8abaaa
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user