[FFmpeg-devel] [PATCH] do not guess channel layout when getting string

Baptiste Coudurier baptiste.coudurier
Sat Jun 13 23:16:54 CEST 2009


Justin Ruggles wrote:
> Hi,
> 
> When getting the string for a channel layout, it doesn't make much sense
> to guess the channel layout if it is not known.  It's more accurate to
> just use the generic "%d channels" unless the actual channel layout is
> known.
> 
> Patch attached.
> 
> -Justin
> 
> 
> 
> ------------------------------------------------------------------------
> 
> Index: libavcodec/audioconvert.c
> ===================================================================
> --- libavcodec/audioconvert.c	(revision 19183)
> +++ libavcodec/audioconvert.c	(working copy)
> @@ -124,9 +124,6 @@
>  {
>      int i;
>  
> -    if (channel_layout==0)
> -        channel_layout = avcodec_guess_channel_layout(nb_channels, CODEC_ID_NONE, NULL);
> -
>      for (i=0; channel_layout_map[i].name; i++)
>          if (nb_channels    == channel_layout_map[i].nb_channels &&
>              channel_layout == channel_layout_map[i].layout) {
> 

I love this patch :)

-- 
Baptiste COUDURIER                              GnuPG Key Id: 0x5C1ABAAA
Key fingerprint                 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
FFmpeg maintainer                                  http://www.ffmpeg.org



More information about the ffmpeg-devel mailing list