changeset 31828:ba740e64ba01

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.
author reimar
date Tue, 03 Aug 2010 05:18:28 +0000
parents e70731bf56be
children 74a1b164126a
files stream/cache2.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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;