[MPlayer-cvslog] r21509 - trunk/stream/stream.c

reimar subversion at mplayerhq.hu
Tue Dec 5 19:30:48 CET 2006


Author: reimar
Date: Tue Dec  5 19:30:48 2006
New Revision: 21509

Modified:
   trunk/stream/stream.c

Log:
Make sure invalid protocols are rejected instead of treated
just like file://


Modified: trunk/stream/stream.c
==============================================================================
--- trunk/stream/stream.c	(original)
+++ trunk/stream/stream.c	Tue Dec  5 19:30:48 2006
@@ -213,7 +213,8 @@
     for(j = 0 ; sinfo->protocols[j] ; j++) {
       l = strlen(sinfo->protocols[j]);
       // l == 0 => Don't do protocol matching (ie network and filenames)
-      if((l == 0) || ((strncmp(sinfo->protocols[j],filename,l) == 0) &&
+      if((l == 0 && !strstr(filename, "://")) ||
+         ((strncmp(sinfo->protocols[j],filename,l) == 0) &&
 		      (strncmp("://",filename+l,3) == 0))) {
 	*file_format = DEMUXER_TYPE_UNKNOWN;
 	s = open_stream_plugin(sinfo,filename,mode,options,file_format,&r);



More information about the MPlayer-cvslog mailing list