[vlc-devel] [PATCH 02/10] aout: refactor aout_DecDelete

Thomas Guillem thomas at gllm.fr
Tue Mar 19 17:45:17 CET 2019


---
 src/audio_output/dec.c | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/src/audio_output/dec.c b/src/audio_output/dec.c
index 91f9ccf2fe..d14218600b 100644
--- a/src/audio_output/dec.c
+++ b/src/audio_output/dec.c
@@ -132,14 +132,16 @@ void aout_DecDelete (audio_output_t *aout)
 {
     aout_owner_t *owner = aout_owner (aout);
 
-    if (owner->mixer_format.i_format)
-    {
-        aout_DecFlush(aout);
-        aout_FiltersDelete (aout, owner->filters);
-        aout_OutputDelete (aout);
-    }
     aout_volume_Delete (owner->volume);
     owner->volume = NULL;
+
+    if (!owner->mixer_format.i_format)
+        return;
+
+    aout_DecFlush(aout);
+    aout_OutputDelete (aout);
+
+    aout_FiltersDelete (aout, owner->filters);
 }
 
 static int aout_CheckReady (audio_output_t *aout)
-- 
2.20.1



More information about the vlc-devel mailing list