diff options
author | Rodeo <[email protected]> | 2012-07-27 23:37:16 +0000 |
---|---|---|
committer | Rodeo <[email protected]> | 2012-07-27 23:37:16 +0000 |
commit | 93dee4d1960fa54a3c08d889f31cd56db1dfbb49 (patch) | |
tree | 9d1def3723b9fb171a72d9caaab534ad71965472 | |
parent | 27900123ecd9bf89122320f3be6c9d7c3c8c5715 (diff) |
Introduce a negative HB_INVALID_AMIXDOWN.
Having the audio->config.out.mixdown start at 0 caused it to be treated as usigned (under OS X at least), causing the sanitizing code in work.c to fail:
line 820, (audio->config.out.mixdown <= 0) would evaluate as false, and so the best mixdown was being set instead of the default one.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4878 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r-- | libhb/common.c | 2 | ||||
-rw-r--r-- | libhb/common.h | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/libhb/common.c b/libhb/common.c index 7bc3e4088..f1a94267c 100644 --- a/libhb/common.c +++ b/libhb/common.c @@ -1634,7 +1634,7 @@ void hb_audio_config_init(hb_audio_config_t * audiocfg) audiocfg->out.bitrate = -1; audiocfg->out.quality = HB_INVALID_AUDIO_QUALITY; audiocfg->out.compression_level = -1; - audiocfg->out.mixdown = -1; + audiocfg->out.mixdown = HB_INVALID_AMIXDOWN; audiocfg->out.dynamic_range_compression = 0; audiocfg->out.gain = 0; audiocfg->out.name = NULL; diff --git a/libhb/common.h b/libhb/common.h index eea705c1e..5b2fc08fa 100644 --- a/libhb/common.h +++ b/libhb/common.h @@ -434,6 +434,8 @@ struct hb_audio_config_s { enum { + // make sure audio->config.out.mixdown isn't treated as unsigned + HB_INVALID_AMIXDOWN = -1, HB_AMIXDOWN_NONE = 0, HB_AMIXDOWN_MONO, HB_AMIXDOWN_STEREO, |