Commit a7f2e897 authored by Felix Paul Kühne's avatar Felix Paul Kühne

macosx: make sure there is a sane default value in the QTKit selector's size fields

parent afe73220
...@@ -278,6 +278,7 @@ static VLCOpen *_o_sharedMainInstance = nil; ...@@ -278,6 +278,7 @@ static VLCOpen *_o_sharedMainInstance = nil;
[[sharedWorkspace notificationCenter] addObserver:self selector:@selector(scanOpticalMedia:) name:NSWorkspaceDidMountNotification object:nil]; [[sharedWorkspace notificationCenter] addObserver:self selector:@selector(scanOpticalMedia:) name:NSWorkspaceDidMountNotification object:nil];
[[sharedWorkspace notificationCenter] addObserver:self selector:@selector(scanOpticalMedia:) name:NSWorkspaceDidUnmountNotification object:nil]; [[sharedWorkspace notificationCenter] addObserver:self selector:@selector(scanOpticalMedia:) name:NSWorkspaceDidUnmountNotification object:nil];
[self scanOpticalMedia:nil]; [self scanOpticalMedia:nil];
[self qtkChanged:nil];
[self setMRL: @""]; [self setMRL: @""];
} }
...@@ -454,7 +455,7 @@ static VLCOpen *_o_sharedMainInstance = nil; ...@@ -454,7 +455,7 @@ static VLCOpen *_o_sharedMainInstance = nil;
- (IBAction)qtkChanged:(id)sender - (IBAction)qtkChanged:(id)sender
{ {
NSInteger i_selectedDevice = [o_qtk_device_pop indexOfSelectedItem]; NSInteger i_selectedDevice = [o_qtk_device_pop indexOfSelectedItem];
if (i_selectedDevice > ([qtkvideoDevices count] - 1)) if (i_selectedDevice >= ([qtkvideoDevices count] - 1))
{ {
NSValue *sizes = [[[[qtkvideoDevices objectAtIndex:i_selectedDevice] formatDescriptions] objectAtIndex: 0] attributeForKey: QTFormatDescriptionVideoEncodedPixelsSizeAttribute]; NSValue *sizes = [[[[qtkvideoDevices objectAtIndex:i_selectedDevice] formatDescriptions] objectAtIndex: 0] attributeForKey: QTFormatDescriptionVideoEncodedPixelsSizeAttribute];
......
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