[vlc-commits] vorbisenc: set maximum channels to 7.1
Thomas Guillem
git at videolan.org
Fri Jan 19 12:01:31 CET 2018
vlc/vlc-3.0 | branch: master | Thomas Guillem <thomas at gllm.fr> | Thu Jan 18 15:58:37 2018 +0100| [1bf8ba3bd9cdf13ea840906efb578bc35ea5dbd2] | committer: Jean-Baptiste Kempf
vorbisenc: set maximum channels to 7.1
(cherry picked from commit 81c5c5820023d2292ec75901fb135ad31a17cea8)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=1bf8ba3bd9cdf13ea840906efb578bc35ea5dbd2
---
modules/codec/vorbis.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/modules/codec/vorbis.c b/modules/codec/vorbis.c
index 6c30af825c..2488255c16 100644
--- a/modules/codec/vorbis.c
+++ b/modules/codec/vorbis.c
@@ -781,6 +781,11 @@ static int OpenEncoder( vlc_object_t *p_this )
p_enc->fmt_in.i_codec = VLC_CODEC_FL32;
p_enc->fmt_out.i_codec = VLC_CODEC_VORBIS;
+ if( p_enc->fmt_in.audio.i_channels >= ARRAY_SIZE(pi_channels_maps) )
+ {
+ p_enc->fmt_in.audio.i_channels = ARRAY_SIZE(pi_channels_maps) - 1;
+ msg_Warn( p_enc, "lowering channel count to %u", p_enc->fmt_in.audio.i_channels );
+ }
config_ChainParse( p_enc, ENC_CFG_PREFIX, ppsz_enc_options, p_enc->p_cfg );
i_quality = var_GetInteger( p_enc, ENC_CFG_PREFIX "quality" );
More information about the vlc-commits
mailing list