[vlc-devel] [PATCH 1/2] faad: initialize i_rate and channels from p_dec_in instead setting them 0 in some cases

Rémi Denis-Courmont remi at remlab.net
Fri Sep 20 10:55:13 CEST 2013


On Fri, 20 Sep 2013 11:33:16 +0300, Ilkka Ollakka <ileoo at videolan.org>
wrote:
> ---
>  modules/codec/faad.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/modules/codec/faad.c b/modules/codec/faad.c
> index 6aba913..df4152e 100644
> --- a/modules/codec/faad.c
> +++ b/modules/codec/faad.c
> @@ -178,8 +178,9 @@ static int Open( vlc_object_t *p_this )
>      else
>      {
>          /* Will be initalised from first frame */
> -        p_dec->fmt_out.audio.i_rate = 0;
> -        p_dec->fmt_out.audio.i_channels = 0;
> +        p_dec->fmt_out.audio.i_rate = p_dec->fmt_in.audio.i_rate;
> +        p_dec->fmt_out.audio.i_channels =
p_dec->fmt_in.audio.i_channels;
> +        msg_Warn( p_dec, "Initializing dummy values from input i_rate
%d
> i_channels %d", p_dec->fmt_out.audio.i_rate,
> p_dec->fmt_out.audio.i_channels );

The decoder core assumes that the decoder sets the physical (and original)
channel masks. The channel count is only a convenience.

>      }
>  
>      /* Set the faad config */

-- 
Rémi Denis-Courmont
Sent from my collocated server



More information about the vlc-devel mailing list