From 35439875ebe6e57067b0af4dbd5e88adac686559 Mon Sep 17 00:00:00 2001 From: michael Date: Wed, 12 May 2004 22:48:15 +0000 Subject: [PATCH] segfault fix git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12464 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpdemux/demux_lavf.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libmpdemux/demux_lavf.c b/libmpdemux/demux_lavf.c index b4f7bf9378..9b3e81fe0e 100644 --- a/libmpdemux/demux_lavf.c +++ b/libmpdemux/demux_lavf.c @@ -138,7 +138,10 @@ int demux_open_lavf(demuxer_t *demuxer){ register_protocol(&mp_protocol); - strncpy(mp_filename + 3, demuxer->stream->url, sizeof(mp_filename)-3); + if(demuxer->stream->url) + strncpy(mp_filename + 3, demuxer->stream->url, sizeof(mp_filename)-3); + else + strncpy(mp_filename + 3, "foobar.dummy", sizeof(mp_filename)-3); url_fopen(&priv->pb, mp_filename, URL_RDONLY);