From 4b2e107710a1f81368433445ee7ed366a4f49700 Mon Sep 17 00:00:00 2001 From: reimar Date: Sun, 24 Jan 2010 10:13:33 +0000 Subject: [PATCH] Fix ftp support to properly support large files > 2GB. Patch by Yuriy Kaminskiy [yumkam mail ru] git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30418 b3059339-0415-0410-9bf9-f77b7e298cf2 --- stream/stream_ftp.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/stream/stream_ftp.c b/stream/stream_ftp.c index 9ccd27a46a..e21e512989 100644 --- a/stream/stream_ftp.c +++ b/stream/stream_ftp.c @@ -244,7 +244,7 @@ static int FtpOpenPort(struct stream_priv_s* p) { 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 mode, void* opts, int* file_format) { 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) {