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

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


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

src: don't require a valid channel layout

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

 modules/audio_filter/resampler/src.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/modules/audio_filter/resampler/src.c b/modules/audio_filter/resampler/src.c
index 7a460f05f2..93febbf644 100644
--- a/modules/audio_filter/resampler/src.c
+++ b/modules/audio_filter/resampler/src.c
@@ -90,17 +90,13 @@ static int OpenResampler (vlc_object_t *obj)
     if (filter->fmt_in.audio.i_format != VLC_CODEC_FL32
      || filter->fmt_out.audio.i_format != VLC_CODEC_FL32
     /* No channels remapping */
-     || filter->fmt_in.audio.i_physical_channels
-                                  != filter->fmt_out.audio.i_physical_channels
-     || filter->fmt_in.audio.i_original_channels
-                                  != filter->fmt_out.audio.i_original_channels)
+     || filter->fmt_in.audio.i_channels != filter->fmt_out.audio.i_channels )
         return VLC_EGENERIC;
 
     int type = var_InheritInteger (obj, "src-converter-type");
-    int channels = aout_FormatNbChannels (&filter->fmt_in.audio);
     int err;
 
-    SRC_STATE *s = src_new (type, channels, &err);
+    SRC_STATE *s = src_new (type, filter->fmt_in.audio.i_channels, &err);
     if (s == NULL)
     {
         msg_Err (obj, "cannot initialize resampler: %s", src_strerror (err));



More information about the vlc-commits mailing list