From 80ef41dccfb69b2d55ced1ad2ae68b1ea9d1d3ff Mon Sep 17 00:00:00 2001 From: reimar Date: Mon, 20 Aug 2007 09:28:44 +0000 Subject: 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 --- libmpdemux/demux_lavf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libmpdemux/demux_lavf.c') diff --git a/libmpdemux/demux_lavf.c b/libmpdemux/demux_lavf.c index 4116fcb874..20dba6c1f0 100644 --- a/libmpdemux/demux_lavf.c +++ b/libmpdemux/demux_lavf.c @@ -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; -- cgit v1.2.3