[vlc-commits] soxr: don't require a valid channel layout

Thomas Guillem git at videolan.org
Mon Jul 10 17:13:46 CEST 2017


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Fri Jul  7 11:39:58 2017 +0200| [238a18eb66b958b28207151a45856ea4afdf4cd8] | committer: Thomas Guillem

soxr: don't require a valid channel layout

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

 modules/audio_filter/resampler/soxr.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/modules/audio_filter/resampler/soxr.c b/modules/audio_filter/resampler/soxr.c
index 17cdcb2c58..d348769778 100644
--- a/modules/audio_filter/resampler/soxr.c
+++ b/modules/audio_filter/resampler/soxr.c
@@ -121,10 +121,7 @@ Open( vlc_object_t *p_obj, bool b_change_ratio )
     filter_t *p_filter = (filter_t *)p_obj;
 
     /* Cannot remix */
-    if( p_filter->fmt_in.audio.i_physical_channels
-            != p_filter->fmt_out.audio.i_physical_channels
-     || p_filter->fmt_in.audio.i_original_channels
-            != p_filter->fmt_out.audio.i_original_channels )
+    if( p_filter->fmt_in.audio.i_channels != p_filter->fmt_out.audio.i_channels )
         return VLC_EGENERIC;
 
     /* Get SoXR input/output format */
@@ -144,7 +141,7 @@ Open( vlc_object_t *p_obj, bool b_change_ratio )
     else if( i_vlc_q > MAX_SOXR_QUALITY )
         i_vlc_q = MAX_SOXR_QUALITY;
     const unsigned long i_recipe = soxr_resampler_quality_list[i_vlc_q];
-    const unsigned i_channels = aout_FormatNbChannels( &p_filter->fmt_in.audio );
+    const unsigned i_channels = p_filter->fmt_in.audio.i_channels;
     const double f_ratio = p_filter->fmt_out.audio.i_rate
                            / (double) p_filter->fmt_in.audio.i_rate;
 



More information about the vlc-commits mailing list