summaryrefslogtreecommitdiffstats
path: root/stream
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2010-01-24 10:13:33 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2010-01-24 10:13:33 +0000
commit4b2e107710a1f81368433445ee7ed366a4f49700 (patch)
tree08eee2f6ae8f22a9a993ae18d2e2ac19ee84c96e /stream
parentf5209d8cc4c8f29f435e924b3769c51dc91a352b (diff)
downloadmpv-4b2e107710a1f81368433445ee7ed366a4f49700.tar.bz2
mpv-4b2e107710a1f81368433445ee7ed366a4f49700.tar.xz
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
Diffstat (limited to 'stream')
-rw-r--r--stream/stream_ftp.c7
1 files 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) {