[vlc-devel] [PATCH 05/12] es_out: propagate decoders state to input

Thomas Guillem thomas at gllm.fr
Thu Jun 9 11:51:57 CEST 2016


---
 src/input/es_out.c | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/src/input/es_out.c b/src/input/es_out.c
index a45189a..68c8a25 100644
--- a/src/input/es_out.c
+++ b/src/input/es_out.c
@@ -1562,13 +1562,22 @@ static bool EsIsSelected( es_out_id_t *es )
         return es->p_dec != NULL;
     }
 }
+
+static void EsOnDecoderState( decoder_t *p_dec, void *p_state_ctx, int i_state )
+{
+    es_out_t *out = p_state_ctx;
+    es_out_sys_t   *p_sys = out->p_sys;
+
+    input_SendDecoderState( p_sys->p_input, p_dec->fmt_out.i_cat, i_state );
+}
+
 static void EsCreateDecoder( es_out_t *out, es_out_id_t *p_es )
 {
     es_out_sys_t   *p_sys = out->p_sys;
     input_thread_t *p_input = p_sys->p_input;
 
     p_es->p_dec = input_DecoderNew( p_input, &p_es->fmt, p_es->p_pgrm->p_clock,
-                                    p_input->p->p_sout, NULL, NULL );
+                                    p_input->p->p_sout, EsOnDecoderState, out );
     if( p_es->p_dec )
     {
         if( p_sys->b_buffering )
-- 
2.8.1



More information about the vlc-devel mailing list