vlc/vlc-2.0 | branch: master | Felix Paul Kühne <[email protected]> | Sat 
Feb 11 16:00:11 2012 +0100| [6955d6a3d8d8da5ac818a57408b0d48805bea4c7] | 
committer: Felix Paul Kühne

macosx: make sure there is a sane default value in the QTKit selector's size 
fields
(cherry picked from commit a7f2e897deb230a9a43bb4c6673833f52db968bb)

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=6955d6a3d8d8da5ac818a57408b0d48805bea4c7
---

 modules/gui/macosx/open.m |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/modules/gui/macosx/open.m b/modules/gui/macosx/open.m
index 6aa8c03..fb20f86 100644
--- a/modules/gui/macosx/open.m
+++ b/modules/gui/macosx/open.m
@@ -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:NSWorkspaceDidUnmountNotification 
object:nil];
     [self scanOpticalMedia:nil];
+    [self qtkChanged:nil];
 
     [self setMRL: @""];
 }
@@ -454,7 +455,7 @@ static VLCOpen *_o_sharedMainInstance = nil;
 - (IBAction)qtkChanged:(id)sender
 {
        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];
 

_______________________________________________
vlc-commits mailing list
[email protected]
http://mailman.videolan.org/listinfo/vlc-commits

Reply via email to