summaryrefslogtreecommitdiffstats
path: root/stream/stream.h
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2010-02-20 18:53:07 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2010-02-20 18:53:07 +0000
commit9554a844e9daef9a702004957f0d74aabacd8403 (patch)
treee51c613d728cffe700d8213e75aefe5d81c6b4ae /stream/stream.h
parent908f8c91e7bf59ca72d25657403ed35dee7b145e (diff)
downloadmpv-9554a844e9daef9a702004957f0d74aabacd8403.tar.bz2
mpv-9554a844e9daef9a702004957f0d74aabacd8403.tar.xz
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
Diffstat (limited to 'stream/stream.h')
-rw-r--r--stream/stream.h2
1 files changed, 2 insertions, 0 deletions
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(pos<s->pos){
off_t x=pos-(s->pos-s->buf_len);
if(x>=0){