[vlc-commits] transcode: spu: fix dequeing on error

Francois Cartegnie git at videolan.org
Mon Jul 9 16:15:36 CEST 2018


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Jun 27 18:06:45 2018 +0200| [cd85c8058682075effa9164c10695edb4440afa8] | committer: Francois Cartegnie

transcode: spu: fix dequeing on error

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

 modules/stream_out/transcode/spu.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/modules/stream_out/transcode/spu.c b/modules/stream_out/transcode/spu.c
index 6443d706a8..7cecdf9d82 100644
--- a/modules/stream_out/transcode/spu.c
+++ b/modules/stream_out/transcode/spu.c
@@ -162,12 +162,13 @@ int transcode_spu_process( sout_stream_t *p_stream,
         return VLC_EGENERIC;
 
     subpicture_t *p_subpics = transcode_dequeue_all_subs( id );
-    if( p_subpics == NULL )
-        return VLC_SUCCESS;
+
     do
     {
         subpicture_t *p_subpic = p_subpics;
-        p_subpics = p_subpics->p_next;
+        if( p_subpic == NULL )
+            break;
+        p_subpics = p_subpic->p_next;
         p_subpic->p_next = NULL;
 
         if( b_error )



More information about the vlc-commits mailing list