diff options
author | dynaflash <[email protected]> | 2010-10-04 16:04:26 +0000 |
---|---|---|
committer | dynaflash <[email protected]> | 2010-10-04 16:04:26 +0000 |
commit | 751b5ad26d4d58baa4c892cd8df92a4dbdacfcd1 (patch) | |
tree | 9fd576e28dbd10902993eb2a200ba75bc3f9c9e3 /macosx/HBAudio.m | |
parent | ece8bfa8ed2e3b8ce4dbb77cc4e3f2914d31bc1d (diff) |
MacGui: Disable the drc dial if source is not AC3 as only our AC3 decoder flags drc.
- Patch by circleone, thanks!
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3568 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx/HBAudio.m')
-rw-r--r-- | macosx/HBAudio.m | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/macosx/HBAudio.m b/macosx/HBAudio.m index 8d226d33e..c3598da3f 100644 --- a/macosx/HBAudio.m +++ b/macosx/HBAudio.m @@ -625,6 +625,20 @@ static NSDictionary *bitRate384 = nil; return retval; } +- (BOOL) AC3Enabled + +{ + BOOL retval = [self enabled]; + + if (YES == retval) { + int myTrackCodec = [[[self track] objectForKey: keyAudioInputCodec] intValue]; + if (HB_ACODEC_AC3 != myTrackCodec) { + retval = NO; + } + } + return retval; +} + + (NSSet *) keyPathsForValuesAffectingEnabled { @@ -637,4 +651,10 @@ static NSDictionary *bitRate384 = nil; return [NSSet setWithObjects: @"track", @"mixdown", nil]; } ++ (NSSet *) keyPathsForValuesAffectingAC3Enabled + +{ + return [NSSet setWithObjects: @"track", nil]; +} + @end |