summaryrefslogtreecommitdiffstats
path: root/stream.h
diff options
context:
space:
mode:
authorarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-08-12 01:59:22 +0000
committerarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-08-12 01:59:22 +0000
commitd65abe9bf9ac4de036e0e349c1791591b5b9d4c6 (patch)
tree9c001f3e3bc6a9918dd2f9fbebdb726a0d2e0bf1 /stream.h
parent5cbfd1065e5ffa0dc73bb9df17e1cdfc34fb3474 (diff)
downloadmpv-d65abe9bf9ac4de036e0e349c1791591b5b9d4c6.tar.bz2
mpv-d65abe9bf9ac4de036e0e349c1791591b5b9d4c6.tar.xz
return type of stream_seek changed void->int
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1492 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'stream.h')
-rw-r--r--stream.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/stream.h b/stream.h
index 31303ef5c5..a3dff14672 100644
--- a/stream.h
+++ b/stream.h
@@ -112,22 +112,22 @@ inline static int stream_seek(stream_t *s,off_t pos){
return stream_seek_long(s,pos);
}
-inline static void stream_skip(stream_t *s,int len){
+inline static int stream_skip(stream_t *s,int len){
if(len<0 || (len>2*STREAM_BUFFER_SIZE && s->type!=STREAMTYPE_STREAM)){
// negative or big skip!
- stream_seek(s,stream_tell(s)+len);
- return;
+ return stream_seek(s,stream_tell(s)+len);
}
while(len>0){
int x=s->buf_len-s->buf_pos;
if(x==0){
- if(!stream_fill_buffer(s)) return; // EOF
+ if(!stream_fill_buffer(s)) return 0; // EOF
x=s->buf_len-s->buf_pos;
}
if(x>len) x=len;
//memcpy(mem,&s->buf[s->buf_pos],x);
s->buf_pos+=x; len-=x;
}
+ return 1;
}
void stream_reset(stream_t *s);