[vlc-devel] [PATCH 7/8] channel_mixer: refuse to convert ambisonics tracks (incomplete commit?)

Adrien Maglo magsoft at videolan.org
Fri Feb 24 16:15:01 CET 2017


---
 modules/audio_filter/channel_mixer/simple.c  | 3 +++
 modules/audio_filter/channel_mixer/trivial.c | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/modules/audio_filter/channel_mixer/simple.c b/modules/audio_filter/channel_mixer/simple.c
index 25af5a8..68e648b 100644
--- a/modules/audio_filter/channel_mixer/simple.c
+++ b/modules/audio_filter/channel_mixer/simple.c
@@ -273,6 +273,9 @@ static int OpenFilter( vlc_object_t *p_this )
     filter_t *p_filter = (filter_t *)p_this;
     void (*do_work)(filter_t *, block_t *, block_t *) = NULL;
 
+    if (p_filter->fmt_in.audio.channel_type != PHYSICAL_CHANNELS)
+        return VLC_EGENERIC;
+
     if( p_filter->fmt_in.audio.i_format != VLC_CODEC_FL32 ||
         p_filter->fmt_in.audio.i_format != p_filter->fmt_out.audio.i_format ||
         p_filter->fmt_in.audio.i_rate != p_filter->fmt_out.audio.i_rate ||
diff --git a/modules/audio_filter/channel_mixer/trivial.c b/modules/audio_filter/channel_mixer/trivial.c
index b500e1a..b92b10d 100644
--- a/modules/audio_filter/channel_mixer/trivial.c
+++ b/modules/audio_filter/channel_mixer/trivial.c
@@ -205,6 +205,9 @@ static int Create( vlc_object_t *p_this )
     const audio_format_t *infmt = &p_filter->fmt_in.audio;
     const audio_format_t *outfmt = &p_filter->fmt_out.audio;
 
+    if (p_filter->fmt_in.audio.channel_type != PHYSICAL_CHANNELS)
+        return VLC_EGENERIC;
+
     if( infmt->i_format != outfmt->i_format
      || infmt->i_rate != outfmt->i_rate
      || infmt->i_format != VLC_CODEC_FL32 )
-- 
2.9.3



More information about the vlc-devel mailing list