[MPlayer-cvslog] CVS: main/libmpdemux stream.c,1.86,1.87

Ivan Kalvachev ikalvachev at gmail.com
Fri Mar 17 11:30:34 CET 2006


2006/3/16, Alban Bedel CVS <syncmail at mplayerhq.hu>:
> 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;
> +}

I may be wrong but why pos is decreased???




More information about the MPlayer-cvslog mailing list