[MPlayer-dev-eng] Re: [PATCH] removing strange ftp check in open.c

adland123 adland123 at yahoo.com
Sat May 14 21:59:07 CEST 2005


> http and rtsp falling back to ftp ????

from what I gathered via testing that code section 
 you removed is only executed if the protocol was not ftp.

when it is gone the streams are opened as normal files (local to disk).

I dont have any ftp site examples to test playing a file via ftp but this 
change may work differently.
it seems to not affect the other stream types.

--- main/libmpdemux/open.c      2005-05-14 13:31:20.000000000 -0400
+++ updated/libmpdemux/open.c   2005-05-14 15:48:47.000000000 -0400
@@ -497,7 +497,7 @@
     strncmp("vcd://", filename, 6) && strncmp("dvb://", filename, 6) &&
     strncmp("cdda://", filename, 7) && strncmp("cddb://", filename, 7) &&
     strncmp("mpst://", filename, 7) && strncmp("tivo://", filename, 7) &&
-    strncmp("file://", filename, 7) &&
+    strncmp("file://", filename, 7) && strncmp("ftp://",filename,6) &&
     strstr(filename, "://")) {
      url = url_new(filename);
     }
@@ -541,7 +541,6 @@
 #endif
        }
         stream=new_stream(f,STREAMTYPE_STREAM);
-    if (strcmp(url->protocol, "ftp")) { // ftp is handled somewhere else
        if( streaming_start( stream, file_format, url )<0){
          mp_msg(MSGT_OPEN,MSGL_ERR,MSGTR_UnableOpenURL, filename);
          url_free(url);
@@ -554,7 +553,6 @@
        return stream;
        }
   }
-  }
 #endif

 //============ Open STDIN or plain FILE ============




More information about the MPlayer-dev-eng mailing list