[vlc-commits] aout: change an assert to a critical error

Thomas Guillem git at videolan.org
Wed Aug 23 16:08:47 CEST 2017


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Wed Aug 23 16:05:46 2017 +0200| [a6407ec0cb09fbbcb4805baabf634edd44794517] | committer: Thomas Guillem

aout: change an assert to a critical error

This error is triggered when an aout module request a linear format from a non
linear one.

Fixes #18655

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

 src/audio_output/filters.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/audio_output/filters.c b/src/audio_output/filters.c
index 3f3eb07a90..ab8de7c39f 100644
--- a/src/audio_output/filters.c
+++ b/src/audio_output/filters.c
@@ -160,7 +160,11 @@ static int aout_FiltersPipelineCreate(vlc_object_t *obj, filter_t **filters,
     audio_sample_format_t input = *infmt;
     unsigned n = 0;
 
-    assert (AOUT_FMT_LINEAR(&input));
+    if (!AOUT_FMT_LINEAR(&input))
+    {
+        msg_Err(obj, "Can't convert non linear input");
+        return -1;
+    }
 
     /* Remix channels */
     if (infmt->i_physical_channels != outfmt->i_physical_channels



More information about the vlc-commits mailing list