[vlc-devel] [PATCH] aout: move assert after the error check

Thomas Guillem thomas at gllm.fr
Thu Oct 24 16:12:44 CEST 2019


This fixes an invalid assert when the module failed to start.
---
 src/audio_output/output.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/audio_output/output.c b/src/audio_output/output.c
index 21b02d78981..fe782d6e1d7 100644
--- a/src/audio_output/output.c
+++ b/src/audio_output/output.c
@@ -602,13 +602,13 @@ int aout_OutputNew (audio_output_t *aout)
         filter_fmt->i_format = fmt->i_format = formats[i];
         ret = aout->start(aout, fmt);
     }
-    assert(aout->flush && aout->play && aout->time_get && aout->pause);
     vlc_mutex_unlock(&owner->lock);
     if (ret)
     {
         msg_Err (aout, "module not functional");
         return -1;
     }
+    assert(aout->flush && aout->play && aout->time_get && aout->pause);
 
     aout_PrepareStereoMode (aout, fmt, filters_cfg, input_chan_type,
                             i_nb_input_channels);
-- 
2.20.1



More information about the vlc-devel mailing list