mirror of
https://github.com/mpv-player/mpv
synced 2025-04-07 19:06:39 +02:00
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:
parent
1b078bc2c5
commit
27408d4f14
@ -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){
|
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!
|
// negative or big skip!
|
||||||
return stream_seek(s,stream_tell(s)+len);
|
return stream_seek(s,stream_tell(s)+len);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user