changeset 12463:3a7ef0fbc2f9

segfault fix
author michael
date Wed, 12 May 2004 22:48:15 +0000
parents 38f523e2c3ba
children d4f559200e16
files libmpdemux/demux_lavf.c
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demux_lavf.c	Wed May 12 22:48:15 2004 +0000
+++ b/libmpdemux/demux_lavf.c	Wed May 12 22:48:15 2004 +0000
@@ -138,7 +138,10 @@
 
     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);