* src/input/*: update position on title change.
authorGildas Bazin <gbazin@videolan.org>
Fri, 20 Aug 2004 09:01:19 +0000 (09:01 +0000)
committerGildas Bazin <gbazin@videolan.org>
Fri, 20 Aug 2004 09:01:19 +0000 (09:01 +0000)
src/input/input.c
src/input/input_internal.h
src/input/stream.c

index 441bb11..e0a95e9 100644 (file)
@@ -1383,6 +1383,8 @@ static void UpdateFromAccess( input_thread_t *p_input )
 
         input_ControlVarTitle( p_input, p_access->info.i_title );
 
+        stream_AccessUpdate( p_input->input.p_stream );
+
         p_access->info.i_update &= ~INPUT_UPDATE_TITLE;
     }
     if( p_access->info.i_update & INPUT_UPDATE_SEEKPOINT )
index edc39d5..17a49c8 100644 (file)
@@ -103,6 +103,7 @@ void input_ConfigVarInit ( input_thread_t * );
 stream_t *stream_AccessNew( access_t *p_access );
 void stream_AccessDelete( stream_t *s );
 void stream_AccessReset( stream_t *s );
+void stream_AccessUpdate( stream_t *s );
 
 /* decoder.c FIXME make it public ?*/
 void       input_DecoderDiscontinuity( decoder_t * p_dec );
index 762e0fa..3844816 100644 (file)
@@ -339,6 +339,15 @@ void stream_AccessReset( stream_t *s )
     }
 }
 
+/****************************************************************************
+ * stream_AccessUpdate:
+ ****************************************************************************/
+void stream_AccessUpdate( stream_t *s )
+{
+    stream_sys_t *p_sys = s->p_sys;
+    p_sys->i_pos = p_sys->p_access->info.i_pos;
+}
+
 /****************************************************************************
  * AStreamControl:
  ****************************************************************************/