[vlc-commits] channel_mixer: mono: prepare format on success

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


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Wed Jul 12 19:05:18 2017 +0200| [93827d63af33ec9f3ffe6dadde28e0e24f0ee47f] | committer: Thomas Guillem

channel_mixer: mono: prepare format on success

This fixes a i_bytes_per_frame/i_frame_length inconsistency when chaining more
than one audio filters.

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

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

diff --git a/modules/audio_filter/channel_mixer/mono.c b/modules/audio_filter/channel_mixer/mono.c
index b11e710fb7..45b64b724a 100644
--- a/modules/audio_filter/channel_mixer/mono.c
+++ b/modules/audio_filter/channel_mixer/mono.c
@@ -397,7 +397,10 @@ static int OpenFilter( vlc_object_t *p_this )
              p_filter->fmt_out.audio.i_bitspersample );
 
     p_filter->fmt_in.audio.i_format = VLC_CODEC_S16N;
+    aout_FormatPrepare(&p_filter->fmt_in.audio);
     p_filter->fmt_out.audio.i_format = VLC_CODEC_S16N;
+    aout_FormatPrepare(&p_filter->fmt_out.audio);
+
     return VLC_SUCCESS;
 }
 



More information about the vlc-commits mailing list