[vlc-commits] audio output must be reset if the format or channels mask changes

Rémi Denis-Courmont git at videolan.org
Tue Mar 6 21:04:32 CET 2012


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Mar  6 22:02:42 2012 +0200| [3e98c8e266ed3279970e4d6842f0ea2496a3ce9a] | committer: Rémi Denis-Courmont

audio output must be reset if the format or channels mask changes

The check would only reset the output if the sample rate or the
bandwidth changed. For example a switch from 16-bits stereo to
32-bits mono would be undetected. Fortunately, this probably never
happened in practice.

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

 src/input/decoder.c |    8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/src/input/decoder.c b/src/input/decoder.c
index 7d2aa2b..52b37bd 100644
--- a/src/input/decoder.c
+++ b/src/input/decoder.c
@@ -2191,12 +2191,8 @@ static aout_buffer_t *aout_new_buffer( decoder_t *p_dec, int i_samples )
     decoder_owner_sys_t *p_owner = p_dec->p_owner;
     aout_buffer_t *p_buffer;
 
-    if( p_owner->p_aout &&
-        ( p_dec->fmt_out.audio.i_rate != p_owner->audio.i_rate ||
-          p_dec->fmt_out.audio.i_original_channels !=
-              p_owner->audio.i_original_channels ||
-          p_dec->fmt_out.audio.i_bytes_per_frame !=
-              p_owner->audio.i_bytes_per_frame ) )
+    if( p_owner->p_aout
+     && !AOUT_FMTS_IDENTICAL(&p_dec->fmt_out.audio, &p_owner->audio) )
     {
         audio_output_t *p_aout = p_owner->p_aout;
 



More information about the vlc-commits mailing list