[MPlayer-cvslog] r37309 - trunk/stream/stream.h

reimar subversion at mplayerhq.hu
Sat Oct 25 17:27:08 CEST 2014


Author: reimar
Date: Sat Oct 25 17:27:08 2014
New Revision: 37309

Log:
stream: Avoid unnecessary seek when our buffer is empty.

Modified:
   trunk/stream/stream.h

Modified: trunk/stream/stream.h
==============================================================================
--- trunk/stream/stream.h	Sat Oct 25 15:40:40 2014	(r37308)
+++ trunk/stream/stream.h	Sat Oct 25 17:27:08 2014	(r37309)
@@ -324,6 +324,8 @@ static inline int stream_seek(stream_t *
            "Invalid seek to negative position %"PRIx64"!\n", pos);
     pos = 0;
   }
+  if (s->buf_len == 0 && s->pos == pos)
+    return 1;
   if(pos<s->pos){
     int64_t x=pos-(s->pos-s->buf_len);
     if(x>=0){


More information about the MPlayer-cvslog mailing list