[vlc-devel] [PATCH 3/3] decoder: reset the ouptut state when the vout is started

Thomas Guillem thomas at gllm.fr
Fri Dec 18 13:06:37 UTC 2020


And not when it is created.
---
 src/input/decoder.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/input/decoder.c b/src/input/decoder.c
index 8bd9daa1a64..f2f643fb656 100644
--- a/src/input/decoder.c
+++ b/src/input/decoder.c
@@ -481,6 +481,10 @@ 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)
             decoder_Notify(p_owner, on_vout_started, p_vout, p_owner->vout_order);
         return 0;
@@ -580,10 +584,6 @@ static int CreateVoutIfNeeded(vlc_input_decoder_t *p_owner)
         return -1;
     }
 
-    vlc_fifo_Lock( p_owner->p_fifo );
-    p_owner->reset_out_state = true;
-    vlc_fifo_Unlock( p_owner->p_fifo );
-
     return 1; // new vout was created
 }
 
-- 
2.29.2



More information about the vlc-devel mailing list