mirror of https://github.com/mpv-player/mpv
Make sure invalid protocols are rejected instead of treated
just like file:// git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21509 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
74a67a1236
commit
ddf1ca2f44
|
@ -213,7 +213,8 @@ stream_t* open_stream_full(char* filename,int mode, char** options, int* file_fo
|
|||
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);
|
||||
|
|
Loading…
Reference in New Issue