summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDamiano Galassi <[email protected]>2019-06-07 11:33:45 +0200
committerDamiano Galassi <[email protected]>2019-06-07 11:33:45 +0200
commit72b57de8eabcc082f1cee715856f8e63dccaeb18 (patch)
tree59906cb6568f06eb081e2c9fa74e47a1b2e9a907
parentf85f228e588bc7a4d2fba43ab51eedfb475768c3 (diff)
MacGui: disable auto passthru fallback encoder options when fallback is set to none.
-rw-r--r--macosx/HBAudioTrackPreset.m11
1 files changed, 8 insertions, 3 deletions
diff --git a/macosx/HBAudioTrackPreset.m b/macosx/HBAudioTrackPreset.m
index 9fa77e877..4421e125c 100644
--- a/macosx/HBAudioTrackPreset.m
+++ b/macosx/HBAudioTrackPreset.m
@@ -198,11 +198,16 @@
}
}
+- (BOOL)isAutoPassthruEnabledWithNoFallback
+{
+ return (self.encoder == HB_ACODEC_AUTO_PASS && self.fallbackEncoder == HB_ACODEC_NONE);
+}
+
- (BOOL)mixdownEnabled
{
BOOL retval = YES;
- if (self.mixdown == HB_AMIXDOWN_NONE)
+ if (self.mixdown == HB_AMIXDOWN_NONE || self.isAutoPassthruEnabledWithNoFallback)
{
// "None" mixdown (passthru)
retval = NO;
@@ -216,7 +221,7 @@
BOOL retval = YES;
int myCodecDefaultBitrate = hb_audio_bitrate_get_default(self.selectedEncoder, 0, 0);
- if (myCodecDefaultBitrate < 0)
+ if (myCodecDefaultBitrate < 0 || self.isAutoPassthruEnabledWithNoFallback)
{
retval = NO;
}
@@ -227,7 +232,7 @@
{
BOOL retval = YES;
- if (self.selectedEncoder & HB_ACODEC_PASS_FLAG)
+ if (self.selectedEncoder & HB_ACODEC_PASS_FLAG || self.isAutoPassthruEnabledWithNoFallback)
{
retval = NO;
}