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

Valentine Zaretsky valik+mplayerdev at email.dp.ua
Sun Feb 29 09:36:48 CET 2004


Hi!

Well... It's even simpler and patching stream_file.c is not needed
This patch is against CVS and fixes only bugs caused by my http-seek 
patch (this time all of them, I hope), but I think that stream_seek_long 
function needs further  rewriting -- at least some parts of it output 
info message and return 1 instead of error message and returning 0 when 
seek cannot be done.

-- 
Best regards, Valentine

eviv bulgroz wrote:

>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;
> }
>
>
>  
>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: seek_fix2.patch
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20040229/8742374e/attachment.asc>


More information about the MPlayer-dev-eng mailing list