Correctly implement ac3 float/fixed encoder.

There is no need to have 2 encoders, the input sample format can,does and should choose which is used
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer
2011-04-16 23:20:48 +02:00
parent bdf3d3bf9d
commit 1aeb88b77d
7 changed files with 145 additions and 40 deletions

View File

@@ -98,8 +98,8 @@ static void scale_coefficients(AC3EncodeContext *s)
}
AVCodec ff_ac3_encoder = {
"ac3",
AVCodec ff_ac3_float_encoder = {
"ac3_float",
AVMEDIA_TYPE_AUDIO,
CODEC_ID_AC3,
sizeof(AC3EncodeContext),
@@ -110,5 +110,5 @@ AVCodec ff_ac3_encoder = {
.sample_fmts = (const enum AVSampleFormat[]){AV_SAMPLE_FMT_FLT,AV_SAMPLE_FMT_NONE},
.long_name = NULL_IF_CONFIG_SMALL("ATSC A/52A (AC-3)"),
.priv_class = &ac3enc_class,
.channel_layouts = ac3_channel_layouts,
.channel_layouts = ff_ac3_channel_layouts,
};