[vlc-commits] aout: avoid NULL dereference (CID #1415560)

Tristan Matthews git at videolan.org
Thu Jul 20 08:07:17 CEST 2017


vlc | branch: master | Tristan Matthews <tmatth at videolan.org> | Thu Jul 20 01:53:48 2017 -0400| [9e559f11737d6db6b2380e0c714d0d6f4fde1bb7] | committer: Tristan Matthews

aout: avoid NULL dereference (CID #1415560)

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

 src/audio_output/filters.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/audio_output/filters.c b/src/audio_output/filters.c
index 155f5b5134..3f3eb07a90 100644
--- a/src/audio_output/filters.c
+++ b/src/audio_output/filters.c
@@ -592,12 +592,14 @@ aout_filters_t *aout_FiltersNew (vlc_object_t *obj,
     }
 
     if (cfg != NULL)
+    {
         AppendRemapFilter(obj, filters, &input_format, &output_format,
                           cfg->remap);
 
-    if (input_format.i_channels > 2 && cfg->headphones)
-        AppendFilter(obj, "audio filter", "binauralizer", filters, NULL,
-                     &input_format, &output_format, NULL);
+        if (input_format.i_channels > 2 && cfg->headphones)
+            AppendFilter(obj, "audio filter", "binauralizer", filters, NULL,
+                    &input_format, &output_format, NULL);
+    }
 
     /* Now add user filters */
     char *str = var_InheritString (obj, "audio-filter");



More information about the vlc-commits mailing list