stream.h: support backswards stream_skip() within buffer

Never just ignore a backwards skip, even if the stream is not seekable
it might still be in a buffer.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31465 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
reimar 2010-06-18 16:36:39 +00:00 committed by Uoti Urpala
parent 1b078bc2c5
commit 27408d4f14
1 changed files with 1 additions and 1 deletions

View File

@ -303,7 +303,7 @@ inline static int stream_seek(stream_t *s,off_t pos){
}
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);
}