[vlc-commits] input: decoder: process spu->p_next

Francois Cartegnie git at videolan.org
Thu Jan 26 16:36:05 CET 2017


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Jan 26 16:34:57 2017 +0100| [7b6f68f62ad6e2ef1cc2bb0ed7e4e7bae1a7271f] | committer: Francois Cartegnie

input: decoder: process spu->p_next

Unused then now leaking

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

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

diff --git a/src/input/decoder.c b/src/input/decoder.c
index 1e8189a..c985bb4 100644
--- a/src/input/decoder.c
+++ b/src/input/decoder.c
@@ -1389,7 +1389,15 @@ static void DecoderProcessSpu( decoder_t *p_dec, block_t *p_block )
     block_t **pp_block = p_block ? &p_block : NULL;
 
     while( (p_spu = p_dec->pf_decode_sub( p_dec, pp_block ) ) )
-        DecoderQueueSpu( p_dec, p_spu );
+    {
+        do
+        {
+            subpicture_t *p = p_spu;
+            p_spu = p_spu->p_next;
+            p->p_next = NULL;
+            DecoderQueueSpu( p_dec, p );
+        } while( p_spu );
+    }
 }
 
 /**



More information about the vlc-commits mailing list