]> git.sesse.net Git - vlc/blobdiff - modules/gui/macosx/output.m
macosx: prevent ugly artifacts when playing a video
[vlc] / modules / gui / macosx / output.m
index 14ff97b768d3136a167695b04c08b2967d5afc90..77d05804ce9b3cc3b79d3ece4b39501ff3051a75 100644 (file)
             /* split up the hostname and the following path to paste the
              * port correctly. Not need, if there isn't any path following the
              * hostname. */
-            NSArray * o_urlItems = [[o_stream_address stringValue] \
-                componentsSeparatedByString: @"/"];
+            NSArray * o_urlItems = [[o_stream_address stringValue] componentsSeparatedByString: @"/"];
             NSMutableString * o_finalStreamAddress;
             o_finalStreamAddress = [[NSMutableString alloc] init];
  
             if ([o_urlItems count] == 1)
             {
-                [o_finalStreamAddress appendFormat: @"\"%@:%@\"", \
-                    [o_stream_address stringValue],[o_stream_port stringValue]];
+                [o_finalStreamAddress appendFormat: @"\"%@:%@\"", [o_stream_address stringValue],[o_stream_port stringValue]];
             }
             else
             {
-                [o_finalStreamAddress appendFormat: @"\"%@:%@", [o_urlItems \
-                    objectAtIndex: 0], [o_stream_port stringValue]];
-                unsigned int x;
-                x = 1;
-                while (x != [o_urlItems count])
+                [o_finalStreamAddress appendFormat: @"\"%@:%@", [o_urlItems objectAtIndex: 0], [o_stream_port stringValue]];
+                NSUInteger itemCount = [o_urlItems count];
+                for (NSUInteger x = 0; x < itemCount; x++)
                 {
-                    [o_finalStreamAddress appendFormat: @"/%@", [o_urlItems \
-                        objectAtIndex: x]];
-                    x = (x + 1);
+                    [o_finalStreamAddress appendFormat: @"/%@", [o_urlItems objectAtIndex: x]];
                 }
                 [o_finalStreamAddress appendString: @"\""];
             }
     if( [o_save_panel runModalForDirectory: nil
             file: o_name] == NSOKButton )
     {
-        NSString *o_filename = [o_save_panel filename];
+        NSString *o_filename = [[o_save_panel URL] path];
         [o_file_field setStringValue: o_filename];
         [self outputInfoChanged: nil];
     }