summaryrefslogtreecommitdiffstats
path: root/macosx/Controller.m
diff options
context:
space:
mode:
authordynaflash <[email protected]>2010-12-28 17:52:00 +0000
committerdynaflash <[email protected]>2010-12-28 17:52:00 +0000
commit95109a9d542c5ae6dd6585b5e7fe122702a8c8d6 (patch)
tree5ff98af30232eec180c969f695317bdd2090b435 /macosx/Controller.m
parenta0b95c80c3c3d1ba7f88fe214da6c0e7f381abfc (diff)
MacGui: Fix popup and output file extension inconsistency. Patch by Rodeo. Thanks!
- Issue with mis matching formats and extensions described here http://forum.handbrake.fr/viewtopic.php?f=4&t=19001 . git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3717 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx/Controller.m')
-rw-r--r--macosx/Controller.m18
1 files changed, 16 insertions, 2 deletions
diff --git a/macosx/Controller.m b/macosx/Controller.m
index a72abcf9f..3764e1892 100644
--- a/macosx/Controller.m
+++ b/macosx/Controller.m
@@ -1858,6 +1858,14 @@ static NSString * ChooseSourceIdentifier = @"Choose Source It
}
[fSrcDVD2Field setStringValue:browsedSourceDisplayName];
+ // use the correct extension based on the container
+ int format = [fDstFormatPopUp indexOfSelectedItem];
+ char *ext = "mp4";
+ if (format == 1)
+ {
+ ext = "mkv";
+ }
+
/* If its a queue rescan for edit, get the queue item output path */
/* if not, its a new source scan. */
/* Check to see if the last destination has been set,use if so, if not, use Desktop */
@@ -1868,12 +1876,18 @@ static NSString * ChooseSourceIdentifier = @"Choose Source It
else if ([[NSUserDefaults standardUserDefaults] stringForKey:@"LastDestinationDirectory"])
{
[fDstFile2Field setStringValue: [NSString stringWithFormat:
- @"%@/%@.mp4", [[NSUserDefaults standardUserDefaults] stringForKey:@"LastDestinationDirectory"],[browsedSourceDisplayName stringByDeletingPathExtension]]];
+ @"%@/%@.%s", [[NSUserDefaults standardUserDefaults] stringForKey:@"LastDestinationDirectory"],[browsedSourceDisplayName stringByDeletingPathExtension],ext]];
}
else
{
[fDstFile2Field setStringValue: [NSString stringWithFormat:
- @"%@/Desktop/%@.mp4", NSHomeDirectory(),[browsedSourceDisplayName stringByDeletingPathExtension]]];
+ @"%@/Desktop/%@.%s", NSHomeDirectory(),[browsedSourceDisplayName stringByDeletingPathExtension],ext]];
+ }
+
+ // set m4v extension if necessary - do not override user-specified .mp4 extension
+ if (format == 0 && applyQueueToScan != YES)
+ {
+ [self autoSetM4vExtension: sender];
}
/* See if this is the main feature according to libhb */