From 08dd16470b70ffaae2e9914c8f6d28ae8784c6ec Mon Sep 17 00:00:00 2001 From: reimar Date: Mon, 20 Aug 2007 09:27:47 +0000 Subject: [PATCH] Add support for AVSEEK_SIZE in demux_lavf git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24104 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpdemux/demux_lavf.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libmpdemux/demux_lavf.c b/libmpdemux/demux_lavf.c index 50250db877..4116fcb874 100644 --- a/libmpdemux/demux_lavf.c +++ b/libmpdemux/demux_lavf.c @@ -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;