[vlc-commits] vorbisenc: setup channels from vorbis info
Thomas Guillem
git at videolan.org
Thu Jan 18 17:37:31 CET 2018
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Thu Jan 18 15:59:27 2018 +0100| [fdb8982c816ec9ee86b22797a08ecbba9fdcc6ac] | committer: Thomas Guillem
vorbisenc: setup channels from vorbis info
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=fdb8982c816ec9ee86b22797a08ecbba9fdcc6ac
---
modules/codec/vorbis.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/modules/codec/vorbis.c b/modules/codec/vorbis.c
index 2488255c16..04a22879d3 100644
--- a/modules/codec/vorbis.c
+++ b/modules/codec/vorbis.c
@@ -869,7 +869,16 @@ static int OpenEncoder( vlc_object_t *p_this )
}
}
+ assert(p_sys->vi.channels > 0 && (size_t) p_sys->vi.channels < ARRAY_SIZE(pi_channels_maps) );
+
+ p_enc->fmt_out.audio.i_channels = p_enc->fmt_in.audio.i_channels =
+ p_sys->vi.channels;
+
+ p_enc->fmt_out.audio.i_physical_channels =
+ p_enc->fmt_in.audio.i_physical_channels =
+ pi_channels_maps[p_sys->vi.channels];
p_sys->i_channels = p_enc->fmt_in.audio.i_channels;
+
p_sys->i_last_block_size = 0;
p_sys->i_samples_delay = 0;
More information about the vlc-commits
mailing list