]> git.sesse.net Git - vlc/commitdiff
Clean up.
authorLaurent Aimar <fenrir@videolan.org>
Mon, 1 Oct 2007 19:57:24 +0000 (19:57 +0000)
committerLaurent Aimar <fenrir@videolan.org>
Mon, 1 Oct 2007 19:57:24 +0000 (19:57 +0000)
src/input/clock.c
src/input/es_out.c
src/input/input_internal.h

index 91db272884af6dc31e3074d0241f29371f01606b..241ea487062f115d6e2ab9d0954b0ca90370916d 100644 (file)
@@ -203,6 +203,15 @@ void input_ClockSetPCR( input_thread_t *p_input,
     }
 }
 
+/*****************************************************************************
+ * input_ClockResetPCR:
+ *****************************************************************************/
+void input_ClockResetPCR( input_thread_t * p_input, input_clock_t *cl )
+{
+    cl->i_synchro_state =  SYNCHRO_REINIT;
+    cl->last_pts = 0;
+}
+
 /*****************************************************************************
  * input_ClockGetTS: manages a PTS or DTS
  *****************************************************************************/
index bb91db3ac5f86787b54ad2f5e1155da55a22658a..94382ffd9ff9abb9053403229c2d2f50eac03bb0 100644 (file)
@@ -1598,10 +1598,7 @@ static int EsOutControl( es_out_t *out, int i_query, va_list args )
 
         case ES_OUT_RESET_PCR:
             for( i = 0; i < p_sys->i_pgrm; i++ )
-            {
-                p_sys->pgrm[i]->clock.i_synchro_state =  SYNCHRO_REINIT;
-                p_sys->pgrm[i]->clock.last_pts = 0;
-            }
+                input_ClockResetPCR( p_sys->p_input, &p_sys->pgrm[i]->clock );
             return VLC_SUCCESS;
 
         case ES_OUT_GET_TS:
index fe2fc010fba955448a1ca7e96fb69e2979c13497..d05056520b304a2c89f1fe3f59614f466cf3b725 100644 (file)
@@ -301,6 +301,7 @@ typedef struct
 
 void    input_ClockInit( input_thread_t *, input_clock_t *, vlc_bool_t b_master, int i_cr_average );
 void    input_ClockSetPCR( input_thread_t *, input_clock_t *, mtime_t );
+void    input_ClockResetPCR( input_thread_t *, input_clock_t * );
 mtime_t input_ClockGetTS( input_thread_t *, input_clock_t *, mtime_t );
 void    input_ClockSetRate( input_thread_t *, input_clock_t *cl );