Add support for AVSEEK_SIZE in demux_lavf

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24104 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
reimar 2007-08-20 09:27:47 +00:00
parent 84a215de32
commit 08dd16470b
1 changed files with 2 additions and 0 deletions

View File

@ -145,6 +145,8 @@ static offset_t mp_seek(URLContext *h, offset_t pos, int whence){
pos += stream->end_pos;
else if(whence == SEEK_SET)
pos += stream->start_pos;
else if(whence == AVSEEK_SIZE && stream->end_pos > 0)
return stream->end_pos - stream->start_pos;
else
return -1;