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

eviv bulgroz ebulgroz at yahoo.com
Mon Feb 23 19:05:32 CET 2004


--- Attila Kinali <attila at kinali.ch> wrote:
> On Mon, 23 Feb 2004 12:21:59 -0500
> D Richard Felker III <dalias at aerifal.cx> wrote:
> 
> > 
> > It's probably non-interleaved. In which case there's no way to play
> > the file from stdin without 600 megs of cache.
> 
> It's not and i made sure it played with mplayer before
> the seeking patch was applied.
> 

Valentine, at least part of your patch problem is probably in the following code since s->seek is
set when reading from stdin for avi streams. seekability should be check here too.

--- libmpdemux/stream.c.orig	Wed Jan 21 12:19:54 2004
+++ libmpdemux/stream.c	Wed Jan 21 15:07:37 2004
@@ -314,6 +314,14 @@
     // A function call that return -1 can tell that the protocol
     // doesn't support seeking.
 #ifdef MPLAYER_NETWORK
+    if(s->seek) { // new stream seek is much cleaner than streaming_ctrl one
+      if(!s->seek(s,newpos)) {
+      	mp_msg(MSGT_STREAM,MSGL_ERR, "Seek failed\n");
+      	return 1;
+      }
+      break;
+    }
+	
     if( s->streaming_ctrl!=NULL && s->streaming_ctrl->streaming_seek ) {
       if( s->streaming_ctrl->streaming_seek( s->fd, pos, s->streaming_ctrl )<0 ) {
         mp_msg(MSGT_STREAM,MSGL_INFO,"Stream not seekable!\n");


Better would be to sort ot this whole seekable/STREAM_SEEK_FW/STREAM_SEEK_BW mess on non seekable
stream. Why is STREAM_SEEK_FW set on an non seekable stream ?
http://mplayerhq.hu/pipermail/mplayer-cvslog/2003-April/014444.html



__________________________________
Do you Yahoo!?
Yahoo! Mail SpamGuard - Read only the mail you want.
http://antispam.yahoo.com/tools




More information about the MPlayer-dev-eng mailing list