summaryrefslogtreecommitdiffstats
path: root/libhb/encfaac.c
diff options
context:
space:
mode:
authormaurj <[email protected]>2007-03-21 10:09:23 +0000
committermaurj <[email protected]>2007-03-21 10:09:23 +0000
commit9f205a922d50183e4df041ed24f9398ceacf8769 (patch)
tree2420aabdd846b261af990bdb621e2f40f1364f1c /libhb/encfaac.c
parentdf6924eaf9dcc86e19582f3cab91304ec739d63e (diff)
Applied and committed saintdev's patch to fix multi-track audio. Only in the CLI for now - the GUI will need updating to reinstate the second audio dropdown.
If the -6 option is specified in the CLI (and faac is specified), then *any* 5.1 tracks specified will be exported as 6-channel AAC. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@438 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/encfaac.c')
-rw-r--r--libhb/encfaac.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/libhb/encfaac.c b/libhb/encfaac.c
index 262bc4de9..3cbe48f24 100644
--- a/libhb/encfaac.c
+++ b/libhb/encfaac.c
@@ -54,9 +54,9 @@ int encfaacInit( hb_work_object_t * w, hb_job_t * job )
pv->job = job;
/* pass the number of channels used into the private work data */
- pv->channelsused = job->channelsused;
+ pv->channelsused = w->config->aac.channelsused;
- pv->faac = faacEncOpen( job->arate, job->channelsused, &pv->input_samples,
+ pv->faac = faacEncOpen( job->arate, w->config->aac.channelsused, &pv->input_samples,
&pv->output_bytes );
pv->buf = malloc( pv->input_samples * sizeof( float ) );
@@ -65,7 +65,7 @@ int encfaacInit( hb_work_object_t * w, hb_job_t * job )
cfg->aacObjectType = LOW;
cfg->allowMidside = 1;
- if (job->channelsused == 6) {
+ if (w->config->aac.channelsused == 6) {
/* we are preserving 5.1 audio into 6-channel AAC,
so indicate that we have an lfe channel */
cfg->useLfe = 1;
@@ -79,10 +79,11 @@ int encfaacInit( hb_work_object_t * w, hb_job_t * job )
cfg->outputFormat = 0;
cfg->inputFormat = FAAC_INPUT_FLOAT;
- if (job->channelsused == 6) {
+ if (w->config->aac.channelsused == 6) {
/* we are preserving 5.1 audio into 6-channel AAC, and need to
re-map the output of deca52 into our own mapping - the mapping
below is the default mapping expected by QuickTime */
+ /* This doesn't seem to be correct for VLC on Linux */
cfg->channel_map[0] = 2;
cfg->channel_map[1] = 1;
cfg->channel_map[2] = 3;