diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2010-08-03 05:18:28 +0000 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2010-11-02 04:15:01 +0200 |
commit | 848610a002d529a3131c270db5d47afaea088a47 (patch) | |
tree | 6d51e173e7e528880a46bf51d296e01b3d487bf4 /stream | |
parent | 9e218d2df19e7fc9390da774de382488b535a64e (diff) | |
download | mpv-848610a002d529a3131c270db5d47afaea088a47.tar.bz2 mpv-848610a002d529a3131c270db5d47afaea088a47.tar.xz |
cache: Don't mess up current position if time-based seek fails
Avoid STREAM_CTRL_SEEK_TO_TIME messing up the current position for stream
types which do not support it.
Fixes seeking in local flv files.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31907 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'stream')
-rw-r--r-- | stream/cache2.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/stream/cache2.c b/stream/cache2.c index 6e77cbcc7e..914f20d601 100644 --- a/stream/cache2.c +++ b/stream/cache2.c @@ -599,7 +599,8 @@ int cache_do_control(stream_t *stream, int cmd, void *arg) { case STREAM_CTRL_SEEK_TO_CHAPTER: case STREAM_CTRL_SEEK_TO_TIME: case STREAM_CTRL_SET_ANGLE: - stream->pos = s->read_filepos = s->control_new_pos; + if (s->control_res != STREAM_UNSUPPORTED) + stream->pos = s->read_filepos = s->control_new_pos; break; } return s->control_res; |