[vlc-commits] channel_mixer: remap: override out format if not compatible

Thomas Guillem git at videolan.org
Thu Jul 13 17:19:08 CEST 2017


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Thu Jul 13 09:22:46 2017 +0200| [ace50a28d7ffd278b2906c973ad10c4953511346] | committer: Thomas Guillem

channel_mixer: remap: override out format if not compatible

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

 modules/audio_filter/channel_mixer/remap.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/modules/audio_filter/channel_mixer/remap.c b/modules/audio_filter/channel_mixer/remap.c
index fa9f67c392..5d4ac5df92 100644
--- a/modules/audio_filter/channel_mixer/remap.c
+++ b/modules/audio_filter/channel_mixer/remap.c
@@ -271,10 +271,6 @@ static int OpenFilter( vlc_object_t *p_this )
     audio_format_t *audio_in  = &p_filter->fmt_in.audio;
     audio_format_t *audio_out = &p_filter->fmt_out.audio;
 
-    if( ( audio_in->i_format != audio_out->i_format ) ||
-        ( audio_in->i_rate != audio_out->i_rate ) )
-        return VLC_EGENERIC;
-
     /* Allocate the memory needed to store the module's structure */
     p_sys = p_filter->p_sys = malloc( sizeof(filter_sys_t) );
     if( unlikely( p_sys == NULL ) )
@@ -337,6 +333,7 @@ static int OpenFilter( vlc_object_t *p_this )
         return VLC_EGENERIC;
     }
 
+    audio_out->i_format = audio_in->i_format;
     audio_out->i_physical_channels = i_output_physical;
     aout_FormatPrepare( audio_out );
 



More information about the vlc-commits mailing list