[MPlayer-dev-eng] Re: [PATCH] Seek in http-streams

eviv bulgroz ebulgroz at yahoo.com
Sun Feb 29 02:43:35 CET 2004


Hi
--- Valentine Zaretsky <valik+mplayerdev at email.dp.ua> wrote:
> Hi, Eviv!
> 
> Thank you for helping me with learning the reason of this breakage!
> 

The following solves the remaining problems due to stdin chunk seeks:

diff -u -r1.4 stream_file.c
--- main/libmpdemux/stream_file.c	14 Aug 2003 12:15:43 -0000	1.4
+++ main/libmpdemux/stream_file.c	29 Feb 2004 00:55:59 -0000
@@ -56,7 +56,11 @@
     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;
 }



__________________________________
Do you Yahoo!?
Get better spam protection with Yahoo! Mail.
http://antispam.yahoo.com/tools




More information about the MPlayer-dev-eng mailing list