mirror of
https://github.com/mpv-player/mpv.git
synced 2026-10-25 04:29:53 +08:00
We can support SEEK_END seeks only when stream->end_pos is known
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24105 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
@@ -141,7 +141,7 @@ static offset_t mp_seek(URLContext *h, offset_t pos, int whence){
|
||||
mp_msg(MSGT_HEADER,MSGL_DBG2,"mp_seek(%p, %d, %d)\n", h, (int)pos, whence);
|
||||
if(whence == SEEK_CUR)
|
||||
pos +=stream_tell(stream);
|
||||
else if(whence == SEEK_END)
|
||||
else if(whence == SEEK_END && stream->end_pos > 0)
|
||||
pos += stream->end_pos;
|
||||
else if(whence == SEEK_SET)
|
||||
pos += stream->start_pos;
|
||||
|
||||
Reference in New Issue
Block a user