From 9554a844e9daef9a702004957f0d74aabacd8403 Mon Sep 17 00:00:00 2001 From: reimar Date: Sat, 20 Feb 2010 18:53:07 +0000 Subject: Do not discard stream buffer on eof, instead reuse it to slightly improve format autodetection with -nocache and non-seekable streams. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30668 b3059339-0415-0410-9bf9-f77b7e298cf2 --- stream/stream.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'stream/stream.h') diff --git a/stream/stream.h b/stream/stream.h index a995b8119f..e281a266f3 100644 --- a/stream/stream.h +++ b/stream/stream.h @@ -282,6 +282,8 @@ inline static int stream_seek(stream_t *s,off_t pos){ mp_dbg(MSGT_DEMUX, MSGL_DBG3, "seek to 0x%qX\n",(long long)pos); + if(s->eof) + return 0; if(pospos){ off_t x=pos-(s->pos-s->buf_len); if(x>=0){ -- cgit v1.2.3