[vlc-commits] aout: add an extra assert

Thomas Guillem git at videolan.org
Mon Jul 10 17:14:18 CEST 2017


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Sat Jul  1 17:48:50 2017 +0200| [fcf6f06200d16655ccc02e46fc107d8f4990d56e] | committer: Thomas Guillem

aout: add an extra assert

An aout module need to set up valid physical channels.

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

 src/audio_output/output.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/audio_output/output.c b/src/audio_output/output.c
index 8a70cdfddc..59d2cb121d 100644
--- a/src/audio_output/output.c
+++ b/src/audio_output/output.c
@@ -445,6 +445,7 @@ int aout_OutputNew (audio_output_t *aout, audio_sample_format_t *restrict fmt)
     }
 
     aout_FormatPrepare (fmt);
+    assert (aout_FormatNbChannels(fmt) > 0);
     assert (fmt->i_bytes_per_frame > 0 && fmt->i_frame_length > 0);
     aout_FormatPrint (aout, "output", fmt);
     return 0;



More information about the vlc-commits mailing list