[vlc-commits] channel_mixer: mono: don't modify fmt on error

Thomas Guillem git at videolan.org
Wed Jul 12 19:10:13 CEST 2017


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Wed Jul 12 18:36:12 2017 +0200| [4a7e83dd27757e34172970073f5d2f98c1e08fa1] | committer: Thomas Guillem

channel_mixer: mono: don't modify fmt on error

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

 modules/audio_filter/channel_mixer/mono.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/modules/audio_filter/channel_mixer/mono.c b/modules/audio_filter/channel_mixer/mono.c
index 3dc29929c7..b11e710fb7 100644
--- a/modules/audio_filter/channel_mixer/mono.c
+++ b/modules/audio_filter/channel_mixer/mono.c
@@ -348,9 +348,6 @@ static int OpenFilter( vlc_object_t *p_this )
         return VLC_EGENERIC;
     }
 
-    p_filter->fmt_in.audio.i_format = VLC_CODEC_S16N;
-    p_filter->fmt_out.audio.i_format = VLC_CODEC_S16N;
-
     /* Allocate the memory needed to store the module's structure */
     p_sys = p_filter->p_sys = malloc( sizeof(filter_sys_t) );
     if( p_sys == NULL )
@@ -399,6 +396,8 @@ static int OpenFilter( vlc_object_t *p_this )
              p_filter->fmt_in.audio.i_bitspersample,
              p_filter->fmt_out.audio.i_bitspersample );
 
+    p_filter->fmt_in.audio.i_format = VLC_CODEC_S16N;
+    p_filter->fmt_out.audio.i_format = VLC_CODEC_S16N;
     return VLC_SUCCESS;
 }
 



More information about the vlc-commits mailing list