mirror of
https://github.com/mpv-player/mpv.git
synced 2024-09-20 12:02:23 +02:00
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
This commit is contained in:
parent
9e218d2df1
commit
848610a002
@ -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_CHAPTER:
|
||||||
case STREAM_CTRL_SEEK_TO_TIME:
|
case STREAM_CTRL_SEEK_TO_TIME:
|
||||||
case STREAM_CTRL_SET_ANGLE:
|
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;
|
break;
|
||||||
}
|
}
|
||||||
return s->control_res;
|
return s->control_res;
|
||||||
|
Loading…
Reference in New Issue
Block a user