[vlc-commits] decoder: don't flush a stopped vout

Thomas Guillem git at videolan.org
Mon Dec 2 13:43:13 CET 2019


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Tue Nov 19 14:04:15 2019 +0100| [2325f7d1b208a57a57d0b4423385f4aadd41e2c4] | committer: Steve Lhomme

decoder: don't flush a stopped vout

Signed-off-by: Steve Lhomme <robux4 at ycbcr.xyz>

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

 src/input/decoder.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/input/decoder.c b/src/input/decoder.c
index 2aa973c99c..48405066dc 100644
--- a/src/input/decoder.c
+++ b/src/input/decoder.c
@@ -1047,7 +1047,7 @@ static void ModuleThread_QueueCc( decoder_t *p_videodec, block_t *p_cc,
 static int ModuleThread_PlayVideo( struct decoder_owner *p_owner, picture_t *p_picture )
 {
     decoder_t *p_dec = &p_owner->dec;
-    vout_thread_t  *p_vout = p_owner->p_vout;
+    vout_thread_t  *p_vout = p_owner->vout_thread_started ? p_owner->p_vout : NULL;
 
     if( p_picture->date == VLC_TICK_INVALID )
         /* FIXME: VLC_TICK_INVALID -- verify video_output */
@@ -1508,12 +1508,12 @@ static void DecoderThread_Flush( struct decoder_owner *p_owner )
     }
     else if( p_dec->fmt_out.i_cat == VIDEO_ES )
     {
-        if( p_owner->p_vout )
+        if( p_owner->p_vout && p_owner->vout_thread_started )
             vout_FlushAll( p_owner->p_vout );
     }
     else if( p_dec->fmt_out.i_cat == SPU_ES )
     {
-        if( p_owner->p_vout )
+        if( p_owner->p_vout && p_owner->vout_thread_started )
         {
             assert( p_owner->i_spu_channel != VOUT_SPU_CHANNEL_INVALID );
             vout_FlushSubpictureChannel( p_owner->p_vout, p_owner->i_spu_channel );



More information about the vlc-commits mailing list