diff options
author | rtognimp <rtognimp@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2004-03-13 16:10:02 +0000 |
---|---|---|
committer | rtognimp <rtognimp@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2004-03-13 16:10:02 +0000 |
commit | 2aa6acd9747aec7f72ebea2addb9cdba98846d7a (patch) | |
tree | 7abd1a62bfd63988151fc2ab624a74d56dd18a18 /libmpdemux/stream_file.c | |
parent | e61fb5349ab1c7e6ae2664ab5ee4d04bb3e8f92b (diff) | |
download | mpv-2aa6acd9747aec7f72ebea2addb9cdba98846d7a.tar.bz2 mpv-2aa6acd9747aec7f72ebea2addb9cdba98846d7a.tar.xz |
Seek in HTTP streams and stdin seek fixes
Patch by eviv bulgroz <ebulgroz(at)yahoo(dot)com>
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12019 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux/stream_file.c')
-rw-r--r-- | libmpdemux/stream_file.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libmpdemux/stream_file.c b/libmpdemux/stream_file.c index a32d19fbc1..974171ecc2 100644 --- a/libmpdemux/stream_file.c +++ b/libmpdemux/stream_file.c @@ -56,7 +56,11 @@ static int seek_forward(stream_t *s,off_t newpos) { return 0; } while(s->pos<newpos){ - if(s->fill_buffer(s,s->buffer,STREAM_BUFFER_SIZE)<=0) break; // EOF + int len=s->fill_buffer(s,s->buffer,STREAM_BUFFER_SIZE); + if(len<=0){ s->eof=1; s->buf_pos=s->buf_len=0; break; } // EOF + s->buf_pos=0; + s->buf_len=len; + s->pos+=len; } return 1; } |