[vlc-commits] decoder: reset the ouptut state when the vout is started

Thomas Guillem git at videolan.org
Mon Dec 21 12:44:47 UTC 2020


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Fri Dec 18 14:03:55 2020 +0100| [cbd1ceebb6bc5e7e6951b6777c648c048c152f03] | committer: Thomas Guillem

decoder: reset the ouptut state when the vout is started

And not when it is created.

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

 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 8bd9daa1a6..f2f643fb65 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
 }
 



More information about the vlc-commits mailing list