# HG changeset patch # User michael # Date 1081695894 0 # Node ID cceadb8af60bc853cc2a2e59472914f061754047 # Parent 6ae21c78ed8da3138e98611698feb7e5f684c57b nicer EOF solution, mpeg-ps works now too diff -r 6ae21c78ed8d -r cceadb8af60b libmpdemux/demux_lavf.c --- a/libmpdemux/demux_lavf.c Sun Apr 11 14:51:10 2004 +0000 +++ b/libmpdemux/demux_lavf.c Sun Apr 11 15:04:54 2004 +0000 @@ -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(posend_pos) + stream_reset(stream); if(stream_seek(stream, pos)==0) return -1; - if(pos==stream->end_pos) - stream->eof=0; + return pos; }