]> granicus.if.org Git - handbrake/commitdiff
MacGui: disable the drc audio widget unless the source is AC3.
authordynaflash <dynaflashtech@gmail.com>
Wed, 10 Nov 2010 19:35:39 +0000 (19:35 +0000)
committerdynaflash <dynaflashtech@gmail.com>
Wed, 10 Nov 2010 19:35:39 +0000 (19:35 +0000)
- original patch by Rodeo ... KVO refactor by circleone.

git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3670 b64f7644-9d1e-0410-96f1-a4d463321fa5

macosx/HBAudio.m

index 9e51a8d7fa6c528ee947c957317495bd30c3fea7..d21c6fbbf0f56bce7545d0d6a8283f7664e4e645 100644 (file)
@@ -607,7 +607,8 @@ static NSMutableArray *masterBitRateArray = nil;
        
        if (YES == retval) {
                int myTrackCodec = [[[self track] objectForKey: keyAudioInputCodec] intValue];
-               if (HB_ACODEC_AC3 != myTrackCodec) {
+               int myCodecCodec = [[[self codec] objectForKey: keyAudioCodec] intValue];
+               if (HB_ACODEC_AC3 != myTrackCodec || HB_ACODEC_AC3_PASS == myCodecCodec) {
                        retval = NO;
                }
        }
@@ -619,9 +620,12 @@ static NSMutableArray *masterBitRateArray = nil;
 {
        NSSet *retval = nil;
 
-       if (YES == [key isEqualToString: @"enabled"] || YES == [key isEqualToString: @"AC3Enabled"]) {
+       if (YES == [key isEqualToString: @"enabled"]) {
                retval = [NSSet setWithObjects: @"track", nil];
                }
+       else if (YES == [key isEqualToString: @"AC3Enabled"]) {
+               retval = [NSSet setWithObjects: @"track", @"codec", nil];
+       }
        else if (YES == [key isEqualToString: @"mixdownEnabled"]) {
                retval = [NSSet setWithObjects: @"track", @"mixdown", nil];
                }