1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-21 22:30:22 +00:00

return type of stream_seek changed void->int

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1492 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
arpi 2001-08-12 01:59:22 +00:00
parent 5cbfd1065e
commit d65abe9bf9

View File

@ -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);