diff options
author | eddyg <[email protected]> | 2008-04-17 00:22:14 +0000 |
---|---|---|
committer | eddyg <[email protected]> | 2008-04-17 00:22:14 +0000 |
commit | 6b67ac13f0094118d8570b95723a77a780ea2a5e (patch) | |
tree | 02b890838f059b6e8344c684788fa75c6f3eab67 /libhb/work.c | |
parent | 1308ef2eb7db6c9db40abec7e5d184cf674ee64b (diff) |
Avoid a divide by 0 in encfaac.c caused by the mixdown not being specified
for AAC tracks (due toi a bug in HandBrake.app). Ensure that a mixdown
is always specified if not doing passthrough.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1423 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/work.c')
-rw-r--r-- | libhb/work.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libhb/work.c b/libhb/work.c index 0632fde07..6efe796db 100644 --- a/libhb/work.c +++ b/libhb/work.c @@ -411,6 +411,15 @@ static void do_job( hb_job_t * job, int cpu_count ) /* sense-check the requested mixdown */ + if( audio->config.out.mixdown == 0 && audio->config.out.codec != HB_ACODEC_AC3 ) + { + /* + * Mixdown wasn't specified and this is not pass-through, set a default mixdown + * of stereo. + */ + audio->config.out.mixdown = HB_AMIXDOWN_STEREO; + } + /* audioCodecsSupportMono and audioCodecsSupport6Ch are the same for now, but this may change in the future, so they are separated for flexibility */ int audioCodecsSupportMono = ( (audio->config.in.codec == HB_ACODEC_AC3 || audio->config.in.codec == HB_ACODEC_DCA) && |