# HG changeset patch # User reimar # Date 1280812708 0 # Node ID ba740e64ba017099a3fd348b7bc9a44e3399dd93 # Parent e70731bf56be6c65f1731884576f0d5405437429 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. diff -r e70731bf56be -r ba740e64ba01 stream/cache2.c --- a/stream/cache2.c Mon Aug 02 18:28:42 2010 +0000 +++ b/stream/cache2.c Tue Aug 03 05:18:28 2010 +0000 @@ -600,7 +600,8 @@ 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;