0
0
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:
reimar 2010-08-03 05:18:28 +00:00 committed by Uoti Urpala
parent 9e218d2df1
commit 848610a002

View File

@ -599,6 +599,7 @@ 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:
if (s->control_res != STREAM_UNSUPPORTED)
stream->pos = s->read_filepos = s->control_new_pos;
break;
}