Commit 7a47acb9 authored by Felix Paul Kühne's avatar Felix Paul Kühne

macosx: fix custom playback options (close #8543)

parent 1e5b4699
...@@ -453,27 +453,29 @@ static VLCOpen *_o_sharedMainInstance = nil; ...@@ -453,27 +453,29 @@ static VLCOpen *_o_sharedMainInstance = nil;
p_item->list.i[[o_file_sub_size_pop indexOfSelectedItem]]]]; p_item->list.i[[o_file_sub_size_pop indexOfSelectedItem]]]];
} }
} }
NSArray * components = [[o_file_starttime_fld stringValue] componentsSeparatedByString:@":"]; if ([o_file_custom_timing_ckb state] == NSOnState) {
NSUInteger componentCount = [components count]; NSArray * components = [[o_file_starttime_fld stringValue] componentsSeparatedByString:@":"];
NSInteger tempValue; NSUInteger componentCount = [components count];
if (componentCount == 1) NSInteger tempValue;
tempValue = 1000000 * ([components[0] intValue]); if (componentCount == 1)
else if (componentCount == 2) tempValue = [components[0] intValue];
tempValue = 1000000 * ([components[0] intValue] * 60 + [components[1] intValue]); else if (componentCount == 2)
else if (componentCount == 3) tempValue = [components[0] intValue] * 60 + [components[1] intValue];
tempValue = 1000000 * ([components[0] intValue] * 3600 + [components[1] intValue] * 60 + [components[2] intValue]); else if (componentCount == 3)
if (tempValue > 0) tempValue = [components[0] intValue] * 3600 + [components[1] intValue] * 60 + [components[2] intValue];
[o_options addObject: [NSString stringWithFormat:@"start-time=%li", tempValue]]; if (tempValue > 0)
components = [[o_file_stoptime_fld stringValue] componentsSeparatedByString:@":"]; [o_options addObject: [NSString stringWithFormat:@"start-time=%li", tempValue]];
componentCount = [components count]; components = [[o_file_stoptime_fld stringValue] componentsSeparatedByString:@":"];
if (componentCount == 1) componentCount = [components count];
tempValue = 1000000 * ([components[0] intValue]); if (componentCount == 1)
else if (componentCount == 2) tempValue = [components[0] intValue];
tempValue = 1000000 * ([components[0] intValue] * 60 + [components[1] intValue]); else if (componentCount == 2)
else if (componentCount == 3) tempValue = [components[0] intValue] * 60 + [components[1] intValue];
tempValue = 1000000 * ([components[0] intValue] * 3600 + [components[1] intValue] * 60 + [components[2] intValue]); else if (componentCount == 3)
if (tempValue > 0) tempValue = [components[0] intValue] * 3600 + [components[1] intValue] * 60 + [components[2] intValue];
[o_options addObject: [NSString stringWithFormat:@"stop-time=%li", tempValue]]; if (tempValue > 0)
[o_options addObject: [NSString stringWithFormat:@"stop-time=%li", tempValue]];
}
if ([o_output_ckbox state] == NSOnState) { if ([o_output_ckbox state] == NSOnState) {
NSArray * soutMRL = [o_sout_options soutMRL]; NSArray * soutMRL = [o_sout_options soutMRL];
NSUInteger count = [soutMRL count]; NSUInteger count = [soutMRL count];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment