summaryrefslogtreecommitdiffstats
path: root/libhb
diff options
context:
space:
mode:
authorRodeo <[email protected]>2012-07-29 14:16:28 +0000
committerRodeo <[email protected]>2012-07-29 14:16:28 +0000
commitd3593cb63f7a6c8602faae00f04da378f060fb4c (patch)
treed5ab5058a5f4283271a8da3c4269704184a7155e /libhb
parent93dee4d1960fa54a3c08d889f31cd56db1dfbb49 (diff)
Use HB_INVALID_AMIXDOWN and HB_AMIXDOWN_NONE where applicable.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4879 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb')
-rw-r--r--libhb/common.c6
-rw-r--r--libhb/work.c9
2 files changed, 8 insertions, 7 deletions
diff --git a/libhb/common.c b/libhb/common.c
index f1a94267c..13a2e1d95 100644
--- a/libhb/common.c
+++ b/libhb/common.c
@@ -761,8 +761,8 @@ int hb_get_best_mixdown(uint32_t codec, uint64_t layout, int mixdown)
}
// return the best that is not greater than the requested mixdown
- // 0 means the caller requested the best available mixdown
- if (best_mixdown > mixdown && mixdown > 0)
+ // HB_INVALID_AMIXDOWN means the caller requested the best available mixdown
+ if (best_mixdown > mixdown && mixdown != HB_INVALID_AMIXDOWN)
best_mixdown = mixdown;
return best_mixdown;
@@ -1681,7 +1681,7 @@ int hb_audio_add(const hb_job_t * job, const hb_audio_config_t * audiocfg)
/* Pass-through, copy from input. */
audio->config.out.samplerate = audio->config.in.samplerate;
audio->config.out.bitrate = audio->config.in.bitrate;
- audio->config.out.mixdown = 0;
+ audio->config.out.mixdown = HB_AMIXDOWN_NONE;
audio->config.out.dynamic_range_compression = 0;
audio->config.out.gain = 0;
audio->config.out.compression_level = -1;
diff --git a/libhb/work.c b/libhb/work.c
index ae7538dfd..6e49687da 100644
--- a/libhb/work.c
+++ b/libhb/work.c
@@ -817,7 +817,7 @@ static void do_job( hb_job_t * job )
audio = hb_list_item( title->list_audio, i );
/* sense-check the requested mixdown */
- if( audio->config.out.mixdown <= 0 &&
+ if( audio->config.out.mixdown <= HB_AMIXDOWN_NONE &&
!( audio->config.out.codec & HB_ACODEC_PASS_FLAG ) )
{
/*
@@ -845,10 +845,11 @@ static void do_job( hb_job_t * job )
}
}
- best_mixdown = hb_get_best_mixdown( audio->config.out.codec,
- audio->config.in.channel_layout, 0 );
+ best_mixdown = hb_get_best_mixdown(audio->config.out.codec,
+ audio->config.in.channel_layout,
+ audio->config.out.mixdown);
- if ( audio->config.out.mixdown > best_mixdown )
+ if (audio->config.out.mixdown != best_mixdown)
{
audio->config.out.mixdown = best_mixdown;
}