[MPlayer-cvslog] CVS: main/libmpdemux stream.c,1.86,1.87
Alban Bedel CVS
syncmail at mplayerhq.hu
Thu Mar 16 15:24:28 CET 2006
CVS change done by Alban Bedel CVS
Update of /cvsroot/mplayer/main/libmpdemux
In directory mail:/var2/tmp/cvs-serv16251/libmpdemux
Modified Files:
stream.c
Log Message:
Fix a potential seek failure, fill_buffer doesn't have to
fill the whole buffer.
Index: stream.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/stream.c,v
retrieving revision 1.86
retrieving revision 1.87
diff -u -r1.86 -r1.87
--- stream.c 1 Mar 2006 21:56:30 -0000 1.86
+++ stream.c 16 Mar 2006 14:24:22 -0000 1.87
@@ -324,11 +324,13 @@
// putchar('%');fflush(stdout);
}
- stream_fill_buffer(s);
- if(pos>=0 && pos<=s->buf_len){
+while(stream_fill_buffer(s) > 0 && pos >= 0) {
+ if(pos<=s->buf_len){
s->buf_pos=pos; // byte position in sector
return 1;
}
+ pos -= s->buf_len;
+}
// if(pos==s->buf_len) printf("XXX Seek to last byte of file -> EOF\n");
More information about the MPlayer-cvslog
mailing list