1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-26 09:02:38 +00: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,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;