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:
wm4 2016-03-05 00:56:55 +01:00
parent 740b7013ba
commit fb2f8abaaa
1 changed files with 1 additions and 1 deletions

View File

@ -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;