]> granicus.if.org Git - handbrake/commitdiff
MacGui: fix auto mixdown.
authorDamiano Galassi <damiog@gmail.com>
Thu, 13 Apr 2017 06:10:15 +0000 (08:10 +0200)
committerDamiano Galassi <damiog@gmail.com>
Fri, 14 Apr 2017 16:46:49 +0000 (18:46 +0200)
(cherry picked from commit e568d96f313009f5dd32bd850a48b9ac1a37a56b)

macosx/HBAudio.m

index 1faae116eee4c722abeba20c3a8bdfd78e7b8d58..8957e0d12d221f19ab067201c2e3fd47d7c60133 100644 (file)
@@ -194,15 +194,7 @@ NSString *HBAudioChangedNotification = @"HBAudioChangedNotification";
         track.drc = [trackDict[@"DRC"] doubleValue];
         track.gain = [trackDict[@"Gain"] doubleValue];
         track.mixdown = hb_mixdown_get_from_name([trackDict[@"Mixdown"] UTF8String]);
-        if ([trackDict[@"Samplerate"] isKindOfClass:[NSString class]])
-        {
-            int sampleRate = hb_audio_samplerate_get_from_name([trackDict[@"Samplerate"] UTF8String]);
-            track.sampleRate = sampleRate == -1 ? 0 : sampleRate;
-        }
-        else
-        {
-            track.sampleRate = [trackDict[@"Samplerate"] intValue];
-        }
+        track.sampleRate = [trackDict[@"Samplerate"] intValue] == -1 ? 0 : [trackDict[@"Samplerate"] intValue];
         track.bitRate = [trackDict[@"Bitrate"] intValue];
         track.encoder = hb_audio_encoder_get_from_name([trackDict[@"Encoder"] UTF8String]);