[vlc-devel] [PATCH 2/2] decoder: read the p_vout once we have the lock

Steve Lhomme robux4 at ycbcr.xyz
Tue Sep 3 12:14:35 CEST 2019


We don't need it before anyway.
---
 src/input/decoder.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/input/decoder.c b/src/input/decoder.c
index 50b2f536d6..dfc52a3ad8 100644
--- a/src/input/decoder.c
+++ b/src/input/decoder.c
@@ -964,7 +964,6 @@ static void DecoderQueueCc( decoder_t *p_videodec, block_t *p_cc,
 static int DecoderPlayVideo( 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;
 
     if( p_picture->date == VLC_TICK_INVALID )
         /* FIXME: VLC_TICK_INVALID -- verify video_output */
@@ -975,6 +974,7 @@ static int DecoderPlayVideo( struct decoder_owner *p_owner, picture_t *p_picture
     }
 
     vlc_mutex_lock( &p_owner->lock );
+    vout_thread_t *p_vout = p_owner->p_vout;
     bool prerolled = p_owner->i_preroll_end != PREROLL_NONE;
     if( prerolled && p_owner->i_preroll_end > p_picture->date )
     {
@@ -1188,7 +1188,6 @@ static void DecoderQueueAudio( decoder_t *p_dec, block_t *p_aout_buf )
 static void DecoderPlaySpu( struct decoder_owner *p_owner, subpicture_t *p_subpic )
 {
     decoder_t *p_dec = &p_owner->dec;
-    vout_thread_t *p_vout = p_owner->p_vout;
 
     /* */
     if( p_subpic->i_start == VLC_TICK_INVALID )
@@ -1200,6 +1199,7 @@ static void DecoderPlaySpu( struct decoder_owner *p_owner, subpicture_t *p_subpi
 
     /* */
     vlc_mutex_lock( &p_owner->lock );
+    vout_thread_t *p_vout = p_owner->p_vout;
 
     if( p_owner->b_waiting )
     {
-- 
2.17.1



More information about the vlc-devel mailing list