[vlc-commits] input: decoder: always reset vout cancel state

Thomas Guillem git at videolan.org
Mon Jul 6 08:47:52 CEST 2020


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Tue Jun 30 10:53:59 2020 +0200| [4897937f04656f40bf5125ade39329961b17e30a] | committer: Thomas Guillem

input: decoder: always reset vout cancel state

It can be reset to false safely, even when the vout_thread is not started.

Fixes the cancel state not reset when the vout is created but not started.

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

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

diff --git a/src/input/decoder.c b/src/input/decoder.c
index 22b0bd3734..b013e485f8 100644
--- a/src/input/decoder.c
+++ b/src/input/decoder.c
@@ -1999,14 +1999,15 @@ static void DeleteDecoder( vlc_input_decoder_t *p_owner )
         case VIDEO_ES: {
             vout_thread_t *vout = p_owner->p_vout;
 
+            if (p_owner->out_pool)
+                picture_pool_Cancel( p_owner->out_pool, false );
+
             if (vout != NULL)
             {
                 if( p_owner->vout_thread_started)
                 {
                     /* Reset the cancel state that was set before joining the
                      * decoder thread */
-                    if (p_owner->out_pool)
-                        picture_pool_Cancel( p_owner->out_pool, false );
                     vout_StopDisplay(vout);
                     p_owner->vout_thread_started = false;
                     decoder_Notify(p_owner, on_vout_stopped, vout);



More information about the vlc-commits mailing list