changeset 31399:a12626be522c

100l, never just ignore a backwards skip, even if the stream is not seekable it might still be in a buffer. Fixes piping of yuv4mpeg files.
author reimar
date Fri, 18 Jun 2010 16:36:39 +0000
parents b240cee8506d
children f6864e52d6be
files stream/stream.h
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/stream/stream.h	Fri Jun 18 16:32:54 2010 +0000
+++ b/stream/stream.h	Fri Jun 18 16:36:39 2010 +0000
@@ -297,7 +297,7 @@
 }
 
 inline static int stream_skip(stream_t *s,off_t len){
-  if( (len<0 && (s->flags & MP_STREAM_SEEK_BW)) || (len>2*STREAM_BUFFER_SIZE && (s->flags & MP_STREAM_SEEK_FW)) ) {
+  if( len<0 || (len>2*STREAM_BUFFER_SIZE && (s->flags & MP_STREAM_SEEK_FW)) ) {
     // negative or big skip!
     return stream_seek(s,stream_tell(s)+len);
   }