From fb2f8abaaab604595474e932ff888d73f6f86fc7 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 5 Mar 2016 00:56:55 +0100 Subject: 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. --- demux/demux_null.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'demux') 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; -- cgit v1.2.3