On 11/12/13 21:40, Martin Storsjö wrote:
> This fixes decoding, broken since 7e35037.
> 
> This is similar to what was done for the normal mp3 decoder in
> f4a86bc9.
> ---
> The issue can be tested with the following realrtsp stream:
> rtsp://dl.lib.brown.edu:554/areserves/1093545294660883.mp3
> ---
>  libavcodec/mpegaudiodec_template.c |    1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/libavcodec/mpegaudiodec_template.c 
> b/libavcodec/mpegaudiodec_template.c
> index 9427dbf..9ce03ef 100644
> --- a/libavcodec/mpegaudiodec_template.c
> +++ b/libavcodec/mpegaudiodec_template.c
> @@ -1722,6 +1722,7 @@ static int decode_frame_adu(AVCodecContext *avctx, void 
> *data,
>      /* update codec info */
>      avctx->sample_rate = s->sample_rate;
>      avctx->channels    = s->nb_channels;
> +    avctx->channel_layout = s->nb_channels == 1 ? AV_CH_LAYOUT_MONO : 
> AV_CH_LAYOUT_STEREO;
>      if (!avctx->bit_rate)
>          avctx->bit_rate = s->bit_rate;
>  
> 

Seems fine assuming no nb_channels doesn't go over 2

lu
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to