[vlc-devel] [PATCH 8/8] decoder: drain sout when requested

Thomas Guillem thomas at gllm.fr
Mon Jan 29 18:25:56 CET 2018


Like for other decoders.
---
 src/input/decoder.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/input/decoder.c b/src/input/decoder.c
index 0d3df97934..5cb3660662 100644
--- a/src/input/decoder.c
+++ b/src/input/decoder.c
@@ -821,6 +821,10 @@ static int DecoderPlaySout( decoder_t *p_dec, block_t *p_sout_block )
     decoder_owner_sys_t *p_owner = p_dec->p_owner;
 
     assert( p_owner->p_clock );
+
+    if( unlikely( p_sout_block == NULL ) )
+        return sout_InputSendBuffer( p_owner->p_sout_input, NULL );
+
     assert( !p_sout_block->p_next );
 
     vlc_mutex_lock( &p_owner->lock );
@@ -909,6 +913,8 @@ static void DecoderProcessSout( decoder_t *p_dec, block_t *p_block )
             p_sout_block = p_next;
         }
     }
+    if( unlikely( !pp_block && p_owner->p_sout_input ) )
+        DecoderPlaySout( p_dec, NULL );
 }
 #endif
 
-- 
2.11.0



More information about the vlc-devel mailing list