[vlc-commits] spdif: aouts can handle an invalid channel count

Thomas Guillem git at videolan.org
Mon May 15 12:27:45 CEST 2017


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Mon May 15 12:21:03 2017 +0200| [db27e3af90dcd98bbfb95fa42ea31ae769b64159] | committer: Thomas Guillem

spdif: aouts can handle an invalid channel count

This fixes audio passthrough when the input is not correctly packetized.

fixes #18269

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

 modules/codec/spdif.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/modules/codec/spdif.c b/modules/codec/spdif.c
index 25e7c5616b..7edba69f38 100644
--- a/modules/codec/spdif.c
+++ b/modules/codec/spdif.c
@@ -78,8 +78,7 @@ OpenDecoder(vlc_object_t *p_this)
     p_dec->fmt_out.audio = p_dec->fmt_in.audio;
     p_dec->fmt_out.audio.i_format = p_dec->fmt_out.i_codec;
 
-    if (p_dec->fmt_out.audio.i_channels == 0
-     || decoder_UpdateAudioFormat(p_dec))
+    if (decoder_UpdateAudioFormat(p_dec))
     {
         es_format_Init(&p_dec->fmt_out, UNKNOWN_ES, 0);
         return VLC_EGENERIC;



More information about the vlc-commits mailing list