summaryrefslogtreecommitdiffstats
path: root/macosx
diff options
context:
space:
mode:
Diffstat (limited to 'macosx')
-rw-r--r--macosx/Controller.h2
-rw-r--r--macosx/Controller.m21
2 files changed, 17 insertions, 6 deletions
diff --git a/macosx/Controller.h b/macosx/Controller.h
index a8ba2631e..c7667a620 100644
--- a/macosx/Controller.h
+++ b/macosx/Controller.h
@@ -79,6 +79,8 @@ BOOL fIsDragging;
// Text Field to show the expanded opts from unparse()
IBOutlet NSTextField * fDisplayX264PresetsUnparseTextField;
char * fX264PresetsUnparsedUTF8String;
+ NSUInteger fX264PresetsHeightForUnparse;
+ NSUInteger fX264PresetsWidthForUnparse;
/* Advanced options tab */
HBAdvancedController * fAdvancedOptions;
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];
}