Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
| ... | ... |
@@ -224,7 +224,7 @@ static av_cold int aac_encode_init(AVCodecContext *avctx) |
| 224 | 224 |
grouping[i] = s->chan_map[i + 1] == TYPE_CPE; |
| 225 | 225 |
ff_psy_init(&s->psy, avctx, 2, sizes, lengths, s->chan_map[0], grouping); |
| 226 | 226 |
s->psypp = ff_psy_preprocess_init(avctx); |
| 227 |
- s->coder = &ff_aac_coders[2]; |
|
| 227 |
+ s->coder = &ff_aac_coders[s->options.aac_coder]; |
|
| 228 | 228 |
|
| 229 | 229 |
s->lambda = avctx->global_quality ? avctx->global_quality : 120; |
| 230 | 230 |
|
| ... | ... |
@@ -690,6 +690,7 @@ static const AVOption aacenc_options[] = {
|
| 690 | 690 |
{"auto", "Selected by the Encoder", 0, AV_OPT_TYPE_CONST, {.dbl = -1 }, INT_MIN, INT_MAX, AACENC_FLAGS, "stereo_mode"},
|
| 691 | 691 |
{"ms_off", "Disable Mid/Side coding", 0, AV_OPT_TYPE_CONST, {.dbl = 0 }, INT_MIN, INT_MAX, AACENC_FLAGS, "stereo_mode"},
|
| 692 | 692 |
{"ms_force", "Force Mid/Side for the whole frame if possible", 0, AV_OPT_TYPE_CONST, {.dbl = 1 }, INT_MIN, INT_MAX, AACENC_FLAGS, "stereo_mode"},
|
| 693 |
+ {"aac_coder", "", offsetof(AACEncContext, options.aac_coder), AV_OPT_TYPE_INT, {.dbl = 2}, 0, AAC_CODER_NB-1, AACENC_FLAGS},
|
|
| 693 | 694 |
{NULL}
|
| 694 | 695 |
}; |
| 695 | 696 |
|