[Mplayer-cvslog] CVS: main/libmpdemux demux_lavf.c,1.2,1.3

Michael Niedermayer CVS syncmail at mplayerhq.hu
Sun Apr 11 17:04:57 CEST 2004


CVS change done by Michael Niedermayer CVS

Update of /cvsroot/mplayer/main/libmpdemux
In directory mail:/var2/tmp/cvs-serv16691/libmpdemux

Modified Files:
	demux_lavf.c 
Log Message:
nicer EOF solution, mpeg-ps works now too


Index: demux_lavf.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_lavf.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- demux_lavf.c	11 Apr 2004 14:51:10 -0000	1.2
+++ demux_lavf.c	11 Apr 2004 15:04:54 -0000	1.3
@@ -57,8 +57,7 @@
     if(stream_eof(stream)) //needed?
         return -1;
     ret=stream_read(stream, buf, size);
-    if(ret>0)
-        stream->eof=0;
+
     mp_msg(MSGT_HEADER,MSGL_DBG2,"%d=mp_read(%p, %p, %d), eof:%d\n", ret, h, buf, size, stream->eof);
     return ret;
 }
@@ -78,10 +77,11 @@
     else if(whence != SEEK_SET)
         return -1;
 
+    if(pos<stream->end_pos)
+        stream_reset(stream);
     if(stream_seek(stream, pos)==0)
         return -1;
-    if(pos==stream->end_pos)
-        stream->eof=0;
+
     return pos;
 }
 




More information about the MPlayer-cvslog mailing list