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:
reimar 2007-08-20 09:28:44 +00:00
parent 08dd16470b
commit 80ef41dccf
1 changed files with 1 additions and 1 deletions

View File

@ -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;