summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRodeo <[email protected]>2015-05-16 21:21:01 +0000
committerRodeo <[email protected]>2015-05-16 21:21:01 +0000
commitd6c41097441f28a5a3a23ffa64ca3555068084d4 (patch)
tree4b1034d0fa314deedc858205a0483dc86d20eac8
parent2879be588a4e89338ceb13409ecc0005977ab781 (diff)
MacGui: remove workaround for the case where the output samplerate is auto and the input samplerate is not known.
libhb now handles it for us. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7200 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r--macosx/HBAudioTrackPreset.m17
1 files changed, 2 insertions, 15 deletions
diff --git a/macosx/HBAudioTrackPreset.m b/macosx/HBAudioTrackPreset.m
index f3f40d813..4ebb2071d 100644
--- a/macosx/HBAudioTrackPreset.m
+++ b/macosx/HBAudioTrackPreset.m
@@ -87,17 +87,7 @@ static void *HBAudioEncoderContex = &HBAudioEncoderContex;
- (void)validateBitrate
{
- int minBitRate = 0;
- int maxBitRate = 0;
-
- int sampleRate = self.sampleRate ? self.sampleRate : DEFAULT_SAMPLERATE;
-
- hb_audio_bitrate_get_limits(self.encoder, sampleRate, self.mixdown, &minBitRate, &maxBitRate);
-
- if (self.bitRate < minBitRate || self.bitRate > maxBitRate)
- {
- self.bitRate = maxBitRate;
- }
+ self.bitRate = hb_audio_bitrate_get_best(self.encoder, self.bitRate, self.sampleRate, self.mixdown);
}
- (BOOL)mixdownEnabled
@@ -204,10 +194,7 @@ static void *HBAudioEncoderContex = &HBAudioEncoderContex;
int minBitRate = 0;
int maxBitRate = 0;
- // If the samplerate is "Auto" pass a fake sampleRate to get the bitrates
- int sampleRate = self.sampleRate ? self.sampleRate : DEFAULT_SAMPLERATE;
-
- hb_audio_bitrate_get_limits(self.encoder, sampleRate, self.mixdown, &minBitRate, &maxBitRate);
+ hb_audio_bitrate_get_limits(self.encoder, self.sampleRate, self.mixdown, &minBitRate, &maxBitRate);
NSMutableArray *bitrates = [[NSMutableArray alloc] init];
for (const hb_rate_t *audio_bitrate = hb_audio_bitrate_get_next(NULL);