[vlc-commits] channel_mixer: trivial: update buffer size when dropping

Thomas Guillem git at videolan.org
Thu Jul 13 15:07:00 CEST 2017


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Thu Jul 13 15:05:49 2017 +0200| [408587e211adfe45345043b2c3e7462875e25757] | committer: Thomas Guillem

channel_mixer: trivial: update buffer size when dropping

This fixes an assert in aout_OutputPlay() when the aout get too much data.

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

 modules/audio_filter/channel_mixer/trivial.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/modules/audio_filter/channel_mixer/trivial.c b/modules/audio_filter/channel_mixer/trivial.c
index c762a32ac9..2e0e20254c 100644
--- a/modules/audio_filter/channel_mixer/trivial.c
+++ b/modules/audio_filter/channel_mixer/trivial.c
@@ -116,6 +116,7 @@ static block_t *Downmix( filter_t *p_filter, block_t *p_buf )
         p_src += i_input_nb;
         p_dest += i_output_nb;
     }
+    p_buf->i_buffer = p_buf->i_buffer * i_output_nb / i_input_nb;
 
     return p_buf;
 }



More information about the vlc-commits mailing list