diff options
author | michael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2004-04-11 15:04:54 +0000 |
---|---|---|
committer | michael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2004-04-11 15:04:54 +0000 |
commit | d854c5c06a45b04c8abb7e84b267b00a59a01a7d (patch) | |
tree | 318e4af397729cf62df51b07acbe9b5513880569 /libmpdemux | |
parent | 1c80573d19426e25d24dc91803d5a49e59f1767d (diff) | |
download | mpv-d854c5c06a45b04c8abb7e84b267b00a59a01a7d.tar.bz2 mpv-d854c5c06a45b04c8abb7e84b267b00a59a01a7d.tar.xz |
nicer EOF solution, mpeg-ps works now too
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12167 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux')
-rw-r--r-- | libmpdemux/demux_lavf.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libmpdemux/demux_lavf.c b/libmpdemux/demux_lavf.c index 99096f8c4f..1a92212385 100644 --- a/libmpdemux/demux_lavf.c +++ b/libmpdemux/demux_lavf.c @@ -57,8 +57,7 @@ static int mp_read(URLContext *h, unsigned char *buf, int size){ 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 @@ static offset_t mp_seek(URLContext *h, offset_t pos, int whence){ 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; } |