[vlc-devel] commit: Removed one dependency of the clock on input_thread_t. ( Laurent Aimar )

git version control git at videolan.org
Sun Sep 28 13:35:57 CEST 2008


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Wed Sep 24 22:13:42 2008 +0200| [b72b3e538b7844b05d01857139eb9a1ba3a8b705] | committer: Laurent Aimar 

Removed one dependency of the clock on input_thread_t.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b72b3e538b7844b05d01857139eb9a1ba3a8b705
---

 src/input/clock.c          |    6 ++----
 src/input/es_out.c         |    8 +++++++-
 src/input/input_internal.h |    2 +-
 3 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/src/input/clock.c b/src/input/clock.c
index 5e2dbf7..4bd82b4 100644
--- a/src/input/clock.c
+++ b/src/input/clock.c
@@ -300,10 +300,8 @@ mtime_t input_clock_GetWakeup( input_clock_t *cl, input_thread_t *p_input )
     if( !cl->b_has_reference )
         return 0;
 
-    /* We must not wait if not pace controled, or we are not the
-     * master clock */
-    if( !p_input->b_can_pace_control || !cl->b_master ||
-        p_input->p->b_out_pace_control )
+    /* We must not wait if we are not the master clock */
+    if( !cl->b_master  )
         return 0;
 
     /* */
diff --git a/src/input/es_out.c b/src/input/es_out.c
index 064b995..b62d05c 100644
--- a/src/input/es_out.c
+++ b/src/input/es_out.c
@@ -355,7 +355,13 @@ mtime_t input_EsOutGetWakeup( es_out_t *out )
 
     if( !p_sys->p_pgrm )
         return 0;
-    return input_clock_GetWakeup( p_sys->p_pgrm->p_clock, p_sys->p_input );
+
+    /* We do not have a wake up date if the input cannot have its speed
+     * controlled or sout is imposing its own */
+    if( !p_input->b_can_pace_control || p_input->p->b_out_pace_control )
+        return 0;
+
+    return input_clock_GetWakeup( p_sys->p_pgrm->p_clock );
 }
 
 static void EsOutDiscontinuity( es_out_t *out, bool b_flush, bool b_audio )
diff --git a/src/input/input_internal.h b/src/input/input_internal.h
index 6d6f1f2..df087ec 100644
--- a/src/input/input_internal.h
+++ b/src/input/input_internal.h
@@ -366,7 +366,7 @@ void    input_clock_ResetPCR( input_clock_t * );
 mtime_t input_clock_GetTS( input_clock_t *, mtime_t i_pts_delay, mtime_t );
 void    input_clock_SetRate( input_clock_t *cl, int i_rate );
 void    input_clock_SetMaster( input_clock_t *cl, bool b_master );
-mtime_t input_clock_GetWakeup( input_clock_t *cl, input_thread_t * );
+mtime_t input_clock_GetWakeup( input_clock_t *cl );
 
 /* Subtitles */
 char **subtitles_Detect( input_thread_t *, char* path, const char *fname );




More information about the vlc-devel mailing list