[MPlayer-cvslog] r30418 - trunk/stream/stream_ftp.c

reimar subversion at mplayerhq.hu
Sun Jan 24 11:13:33 CET 2010


Author: reimar
Date: Sun Jan 24 11:13:33 2010
New Revision: 30418

Log:
Fix ftp support to properly support large files > 2GB.
Patch by Yuriy Kaminskiy [yumkam mail ru]

Modified:
   trunk/stream/stream_ftp.c

Modified: trunk/stream/stream_ftp.c
==============================================================================
--- trunk/stream/stream_ftp.c	Sun Jan 24 04:21:18 2010	(r30417)
+++ trunk/stream/stream_ftp.c	Sun Jan 24 11:13:33 2010	(r30418)
@@ -244,7 +244,7 @@ static int FtpOpenPort(struct stream_pri
   return fd;
 }
 
-static int FtpOpenData(stream_t* s,size_t newpos) {
+static int FtpOpenData(stream_t* s,off_t newpos) {
   struct stream_priv_s* p = s->priv;
   int resp;
   char str[256],rsp_txt[256];
@@ -369,7 +369,8 @@ static void close_f(stream_t *s) {
 
 
 static int open_f(stream_t *stream,int mode, void* opts, int* file_format) {
-  int len = 0,resp;
+  int resp;
+  int64_t len = 0;
   struct stream_priv_s* p = (struct stream_priv_s*)opts;
   char str[256],rsp_txt[256];
 
@@ -438,7 +439,7 @@ static int open_f(stream_t *stream,int m
     mp_msg(MSGT_OPEN,MSGL_WARN, "[ftp] command '%s' failed: %s\n",str,rsp_txt);
   } else {
     int dummy;
-    sscanf(rsp_txt,"%d %d",&dummy,&len);
+    sscanf(rsp_txt,"%d %"SCNd64,&dummy,&len);
   }
 
   if(len > 0) {


More information about the MPlayer-cvslog mailing list