[vlc-commits] macosx: fixed crash when opening DVDs with uncommon disk names (close #7146 )
vlc/vlc-2.0 | branch: master | Felix Paul Kühne | Sun Jul 15 19:39:08 2012 +0200| [87a9a0ba2cc6f7fbe7f2117892a27b2c000c1a56] | committer: Christoph Miebach macosx: fixed crash when opening DVDs with uncommon disk names (close #7146) (cherry picked from commit 68889de9bd2481b86c44e4d4150bbad19ffd5416) > http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=87a9a0ba2cc6f7fbe7f2117892a27b2c000c1a56 --- modules/gui/macosx/open.m | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/gui/macosx/open.m b/modules/gui/macosx/open.m index 576c800..028703a 100644 --- a/modules/gui/macosx/open.m +++ b/modules/gui/macosx/open.m @@ -708,13 +708,13 @@ static VLCOpen *_o_sharedMainInstance = nil; GetVolParmsInfoBuffer volumeParms; err = FSGetVolumeParms( actualVolume, &volumeParms, sizeof(volumeParms) ); -if ( noErr != err ) { -msg_Err( p_intf, "error retrieving volume params, bailing out" ); -return @""; +if ( noErr == err ) +{ +NSString *bsdName = [NSString stringWithUTF8String:(char *)volumeParms.vMDeviceID]; +return [NSString stringWithFormat:@"/dev/r%@", bsdName]; } -NSString *bsdName = [NSString stringWithUTF8String:(char *)volumeParms.vMDeviceID]; -return [NSString stringWithFormat:@"/dev/r%@", bsdName]; +return @""; } - (char *)getVolumeTypeFromMountPath:(NSString *)mountPath @@ -776,7 +776,7 @@ static VLCOpen *_o_sharedMainInstance = nil; BOOL isDir; if ([fm fileExistsAtPath:fullPath isDirectory:&isDir] && isDir) -{ +{ if ([currentFile caseInsensitiveCompare:@"SVCD"] == NSOrderedSame) { returnValue = kVLCMediaSVCD; ___ vlc-commits mailing list vlc-commits@videolan.org http://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] macosx: fixed crash when opening DVDs with uncommon disk names (close #7146 )
vlc/vlc-2.0 | branch: master | Felix Paul Kühne | Sun Jul 15 19:39:08 2012 +0200| [d444204002b3ed289a149e5283a316e9995a34e8] | committer: Felix Paul Kühne macosx: fixed crash when opening DVDs with uncommon disk names (close #7146) (cherry picked from commit 68889de9bd2481b86c44e4d4150bbad19ffd5416) > http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=d444204002b3ed289a149e5283a316e9995a34e8 --- modules/gui/macosx/open.m | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/gui/macosx/open.m b/modules/gui/macosx/open.m index 576c800..028703a 100644 --- a/modules/gui/macosx/open.m +++ b/modules/gui/macosx/open.m @@ -708,13 +708,13 @@ static VLCOpen *_o_sharedMainInstance = nil; GetVolParmsInfoBuffer volumeParms; err = FSGetVolumeParms( actualVolume, &volumeParms, sizeof(volumeParms) ); -if ( noErr != err ) { -msg_Err( p_intf, "error retrieving volume params, bailing out" ); -return @""; +if ( noErr == err ) +{ +NSString *bsdName = [NSString stringWithUTF8String:(char *)volumeParms.vMDeviceID]; +return [NSString stringWithFormat:@"/dev/r%@", bsdName]; } -NSString *bsdName = [NSString stringWithUTF8String:(char *)volumeParms.vMDeviceID]; -return [NSString stringWithFormat:@"/dev/r%@", bsdName]; +return @""; } - (char *)getVolumeTypeFromMountPath:(NSString *)mountPath @@ -776,7 +776,7 @@ static VLCOpen *_o_sharedMainInstance = nil; BOOL isDir; if ([fm fileExistsAtPath:fullPath isDirectory:&isDir] && isDir) -{ +{ if ([currentFile caseInsensitiveCompare:@"SVCD"] == NSOrderedSame) { returnValue = kVLCMediaSVCD; ___ vlc-commits mailing list vlc-commits@videolan.org http://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] macosx: fixed crash when opening DVDs with uncommon disk names (close #7146 )
vlc | branch: master | Felix Paul Kühne | Sun Jul 15 19:39:08 2012 +0200| [68889de9bd2481b86c44e4d4150bbad19ffd5416] | committer: Felix Paul Kühne macosx: fixed crash when opening DVDs with uncommon disk names (close #7146) > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=68889de9bd2481b86c44e4d4150bbad19ffd5416 --- modules/gui/macosx/open.m | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/gui/macosx/open.m b/modules/gui/macosx/open.m index e1cf3ed..c5ef82e 100644 --- a/modules/gui/macosx/open.m +++ b/modules/gui/macosx/open.m @@ -832,13 +832,13 @@ static VLCOpen *_o_sharedMainInstance = nil; GetVolParmsInfoBuffer volumeParms; err = FSGetVolumeParms( actualVolume, &volumeParms, sizeof(volumeParms) ); -if ( noErr != err ) { -msg_Err( p_intf, "error retrieving volume params, bailing out" ); -return @""; +if ( noErr == err ) +{ +NSString *bsdName = [NSString stringWithUTF8String:(char *)volumeParms.vMDeviceID]; +return [NSString stringWithFormat:@"/dev/r%@", bsdName]; } -NSString *bsdName = [NSString stringWithUTF8String:(char *)volumeParms.vMDeviceID]; -return [NSString stringWithFormat:@"/dev/r%@", bsdName]; +return @""; } - (char *)getVolumeTypeFromMountPath:(NSString *)mountPath @@ -900,7 +900,7 @@ static VLCOpen *_o_sharedMainInstance = nil; BOOL isDir; if ([fm fileExistsAtPath:fullPath isDirectory:&isDir] && isDir) -{ +{ if ([currentFile caseInsensitiveCompare:@"SVCD"] == NSOrderedSame) { returnValue = kVLCMediaSVCD; ___ vlc-commits mailing list vlc-commits@videolan.org http://mailman.videolan.org/listinfo/vlc-commits