[vlc-devel] [PATCH] decoder: also drain the decoder when draining the packetizer

Thomas Guillem thomas at gllm.fr
Thu Dec 3 15:20:09 CET 2015


When p_block was NULL, DecoderThread was draining its packetizer or its
decoder, but was not draining both (when a packetizer was used).
---
 src/input/decoder.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/input/decoder.c b/src/input/decoder.c
index c4fb6a1..086ed21 100644
--- a/src/input/decoder.c
+++ b/src/input/decoder.c
@@ -981,6 +981,9 @@ static void DecoderProcessVideo( decoder_t *p_dec, block_t *p_block )
                 p_packetized_block = p_next;
             }
         }
+        /* Drain the decoder after the packetizer is drained */
+        if( !p_block )
+            DecoderDecodeVideo( p_dec, NULL );
     }
     else
     {
@@ -1122,6 +1125,9 @@ static void DecoderProcessAudio( decoder_t *p_dec, block_t *p_block )
                 p_packetized_block = p_next;
             }
         }
+        /* Drain the decoder after the packetizer is drained */
+        if( !p_block )
+            DecoderDecodeAudio( p_dec, NULL );
     }
     else
     {
-- 
2.1.4



More information about the vlc-devel mailing list