[vlc-commits] decoder: always release the vout

Thomas Guillem git at videolan.org
Mon Jun 29 13:16:09 CEST 2020


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Fri Jun 26 13:22:04 2020 +0200| [3df9e5cf9f0c5dae8406dfe00b646038bc8775df] | committer: Thomas Guillem

decoder: always release the vout

The vout was released only when already started. This fixes the
"assert( p_resource->i_vout == 0 || p_resource->p_vout_free == p_resource->pp_vout[0] );"
from input_resource_SetInput() when the vout failed to start.

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

 src/input/decoder.c | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/src/input/decoder.c b/src/input/decoder.c
index 0c216bfca4..22b0bd3734 100644
--- a/src/input/decoder.c
+++ b/src/input/decoder.c
@@ -1999,15 +1999,18 @@ static void DeleteDecoder( vlc_input_decoder_t *p_owner )
         case VIDEO_ES: {
             vout_thread_t *vout = p_owner->p_vout;
 
-            if (vout != NULL && p_owner->vout_thread_started)
+            if (vout != NULL)
             {
-                /* 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);
+                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);
+                }
                 input_resource_PutVout(p_owner->p_resource, vout);
             }
             break;



More information about the vlc-commits mailing list