]> git.sesse.net Git - vlc/commitdiff
enable the macosx GUI to handle negative stop-time
authorAleksandr Pasechnik <al@megamicron.net>
Sat, 21 Mar 2015 00:51:46 +0000 (20:51 -0400)
committerFelix Paul Kühne <fkuehne@videolan.org>
Mon, 23 Mar 2015 18:46:21 +0000 (19:46 +0100)
Signed-off-by: Felix Paul Kühne <fkuehne@videolan.org>
modules/gui/macosx/misc.m
modules/gui/macosx/open.m
modules/gui/macosx/playlist.m
modules/gui/macosx/wizard.m

index 9769172172ac0bac094053401d54353a75aea9de..b20ab77fff7d42f949b825ae1c0d0185e5438308 100644 (file)
@@ -867,7 +867,7 @@ void _drawFrameInRect(NSRect frameRect)
 {
     self = [super init];
     NSMutableCharacterSet *nonNumbers = [[[NSCharacterSet decimalDigitCharacterSet] invertedSet] mutableCopy];
-    [nonNumbers removeCharactersInString:@":"];
+    [nonNumbers removeCharactersInString:@"-:"];
     o_forbidden_characters = [nonNumbers copy];
     [nonNumbers release];
 
index d37d497e085555aa44c9438434a8deefdbdf7dec..c13279361819479d6bceec1e2edbd497769ddda2 100644 (file)
@@ -475,7 +475,7 @@ static VLCOpen *_o_sharedMainInstance = nil;
                 tempValue = [[components objectAtIndex:0] intValue] * 60 + [[components objectAtIndex:1] intValue];
             else if (componentCount == 3)
                 tempValue = [[components objectAtIndex:0] intValue] * 3600 + [[components objectAtIndex:1] intValue] * 60 + [[components objectAtIndex:2] intValue];
-            if (tempValue > 0)
+            if (tempValue != 0)
                 [o_options addObject: [NSString stringWithFormat:@"stop-time=%li", tempValue]];
         }
         if ([o_output_ckbox state] == NSOnState) {
index 825f1c298ecf5e97bebb63b75a59364ef21d16ef..e29644a8bb4429dba21c40cb1817b430c915b60b 100644 (file)
     /* allow the user to over-write the start/stop/run-time */
     if (var_GetFloat(p_input_thread, "run-time") > 0 ||
         var_GetFloat(p_input_thread, "start-time") > 0 ||
-        var_GetFloat(p_input_thread, "stop-time") > 0) {
+        var_GetFloat(p_input_thread, "stop-time") != 0) {
         return;
     }
 
index e8c832fc6abcc51176ad611f4aed5a6d3eaf7fe8..7db0503e9aa94c8eb2184e47dcd1a7ff98524ac4 100644 (file)
@@ -1232,7 +1232,7 @@ static VLCWizard *_o_sharedInstance = nil;
                     time = 1000000 * ([[components objectAtIndex:0] intValue] * 3600 + [[components objectAtIndex:1] intValue] * 60 + [[components objectAtIndex:2] intValue]);
                 else
                     msg_Err(VLCIntf, "Invalid string format for time");
-                input_item_AddOption(p_input, [[NSString stringWithFormat: @"stop-time=%lu", time] UTF8String], VLC_INPUT_OPTION_TRUSTED);
+                input_item_AddOption(p_input, [[NSString stringWithFormat: @"stop-time=%ld", time] UTF8String], VLC_INPUT_OPTION_TRUSTED);
             }
 
             input_item_AddOption( p_input, [[NSString stringWithFormat: