summaryrefslogtreecommitdiffstats
path: root/macosx/Controller.m
diff options
context:
space:
mode:
Diffstat (limited to 'macosx/Controller.m')
-rw-r--r--macosx/Controller.m21
1 files changed, 15 insertions, 6 deletions
diff --git a/macosx/Controller.m b/macosx/Controller.m
index d10bcce3e..d19f7f754 100644
--- a/macosx/Controller.m
+++ b/macosx/Controller.m
@@ -5579,7 +5579,8 @@ the user is using "Custom" settings by determining the sender*/
const char *advanced_opts = NULL;
const char *h264_profile = NULL;
const char *h264_level = NULL;
- int unparse_width, unparse_height;
+ int width = 1;
+ int height = 1;
// prepare the tune, advanced options, profile and level
if ([(tmpString = [self x264Tune]) length])
{
@@ -5597,9 +5598,12 @@ the user is using "Custom" settings by determining the sender*/
{
h264_level = [tmpString UTF8String];
}
- // prepare the width and height (FIXME)
- unparse_width = 1280;
- unparse_height = 720;
+ // width and height must be non-zero
+ if (fX264PresetsWidthForUnparse && fX264PresetsHeightForUnparse)
+ {
+ width = fX264PresetsWidthForUnparse;
+ height = fX264PresetsHeightForUnparse;
+ }
// free the previous unparsed string
free(fX264PresetsUnparsedUTF8String);
// now, unparse
@@ -5608,8 +5612,7 @@ the user is using "Custom" settings by determining the sender*/
advanced_opts,
h264_profile,
h264_level,
- unparse_width,
- unparse_height);
+ width, height);
// update the text field
[fDisplayX264PresetsUnparseTextField setStringValue:
[NSString stringWithFormat:@"x264 Unparse: %s",
@@ -5771,6 +5774,12 @@ the user is using "Custom" settings by determining the sender*/
}
[fVideoFiltersField setStringValue: [NSString stringWithFormat:@"Video Filters: %@", videoFilters]];
+ /* Store storage resolution for unparse */
+ fX264PresetsWidthForUnparse = fTitle->job->width;
+ fX264PresetsHeightForUnparse = fTitle->job->height;
+ // width or height may have changed, unparse
+ [self x264PresetsChangedDisplayExpandedOptions:nil];
+
//[fPictureController reloadStillPreview];
}