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

Ilkka Ollakka ileoo at videolan.org
Fri Sep 20 10:48:25 CEST 2013


On Fri, Sep 20, 2013 at 11:33:16AM +0300, Ilkka Ollakka 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;

Initializing i_rate != 0 would block reconfig in line 261, but is there
cases where demuxer can give other channel/samplerate info than decoder
in faad case?

> -        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 );
>      }

>      /* Set the faad config */
-- 
Ilkka Ollakka
No shirt, no shoes, no service.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: Digital signature
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20130920/64ecb22a/attachment.sig>


More information about the vlc-devel mailing list