changeset 9849:5b649442fe72

Check that we really got a filename.
author albeu
date Sun, 06 Apr 2003 16:30:09 +0000
parents c616ebcda25a
children 564678d0bc15
files libmpdemux/stream_file.c
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/stream_file.c	Sun Apr 06 16:27:14 2003 +0000
+++ b/libmpdemux/stream_file.c	Sun Apr 06 16:30:09 2003 +0000
@@ -77,6 +77,12 @@
     return STREAM_UNSUPORTED;
   }
 
+  if(!p->filename) {
+    mp_msg(MSGT_OPEN,MSGL_ERR, "[file] No filename\n");
+    m_struct_free(&stream_opts,opts);
+    return STREAM_ERROR;
+  }
+
 #if defined(__CYGWIN__)|| defined(__MINGW32__)
   m |= O_BINARY;
 #endif