[vlc-commits] decoder: reset vout state only once
    Thomas Guillem 
    git at videolan.org
       
    Fri Mar 12 09:52:51 UTC 2021
    
    
  
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Thu Mar 11 10:22:21 2021 +0100| [69a685f34f1423c464523a4eedab049cb2b0d8f6] | committer: Thomas Guillem
decoder: reset vout state only once
Reset the vout state only if the new vout was just started.
Fixes assert(!sys->pause.is_on || !is_paused) on vout_ChangePause().
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=69a685f34f1423c464523a4eedab049cb2b0d8f6
---
 src/input/decoder.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/src/input/decoder.c b/src/input/decoder.c
index be04818859..4d9b58e14b 100644
--- a/src/input/decoder.c
+++ b/src/input/decoder.c
@@ -483,12 +483,14 @@ static int ModuleThread_UpdateVideoFormat( decoder_t *p_dec, vlc_video_context *
         p_owner->vout_started = true;
         vlc_mutex_unlock( &p_owner->lock );
 
-        vlc_fifo_Lock( p_owner->p_fifo );
-        p_owner->reset_out_state = true;
-        vlc_fifo_Unlock( p_owner->p_fifo );
-
         if (has_started)
+        {
+            vlc_fifo_Lock( p_owner->p_fifo );
+            p_owner->reset_out_state = true;
+            vlc_fifo_Unlock( p_owner->p_fifo );
+
             decoder_Notify(p_owner, on_vout_started, p_vout, p_owner->vout_order);
+        }
         return 0;
     }
 
    
    
More information about the vlc-commits
mailing list