[Ffmpeg-devel] [PATCH] do not force output audio channels to 2

Måns Rullgård mru
Wed Jan 24 21:24:45 CET 2007


Baptiste Coudurier <baptiste.coudurier at smartjog.com> writes:

> $subject. Many codecs supports > 2 channels output.
>
> -- 
> Baptiste COUDURIER                              GnuPG Key Id: 0x5C1ABAAA
> SMARTJOG S.A.                                    http://www.smartjog.com
> Key fingerprint                 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
> Phone: +33 1 49966312
>
> Index: ffmpeg.c
> ===================================================================
> --- ffmpeg.c	(revision 7695)
> +++ ffmpeg.c	(working copy)
> @@ -2954,13 +2954,7 @@
>              audio_enc->global_quality = st->quality = FF_QP2LAMBDA * audio_qscale;
>          }
>          audio_enc->thread_count = thread_count;
> -        /* For audio codecs other than AC3 or DTS we limit */
> -        /* the number of coded channels to stereo   */
> -        if (audio_channels > 2 && codec_id != CODEC_ID_AC3
> -            && codec_id != CODEC_ID_DTS) {
> -            audio_enc->channels = 2;
> -        } else
> -            audio_enc->channels = audio_channels;
> +        audio_enc->channels = audio_channels;
>      }
>      audio_enc->sample_rate = audio_sample_rate;
>      audio_enc->time_base= (AVRational){1, audio_sample_rate};

Looks reasonable.

Information like number of channels supported ought really be added to
AVCodec, but that's for another patch.

-- 
M?ns Rullg?rd
mru at inprovide.com




More information about the ffmpeg-devel mailing list