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

macosx: fixed crash when opening DVDs with uncommon disk names (close #7146)

(cherry picked from commit 68889de9bd2481b86c44e4d4150bbad19ffd5416)
parent 5a39587c
...@@ -708,13 +708,13 @@ static VLCOpen *_o_sharedMainInstance = nil; ...@@ -708,13 +708,13 @@ static VLCOpen *_o_sharedMainInstance = nil;
GetVolParmsInfoBuffer volumeParms; GetVolParmsInfoBuffer volumeParms;
err = FSGetVolumeParms( actualVolume, &volumeParms, sizeof(volumeParms) ); err = FSGetVolumeParms( actualVolume, &volumeParms, sizeof(volumeParms) );
if ( noErr != err ) { if ( noErr == err )
msg_Err( p_intf, "error retrieving volume params, bailing out" ); {
return @""; NSString *bsdName = [NSString stringWithUTF8String:(char *)volumeParms.vMDeviceID];
return [NSString stringWithFormat:@"/dev/r%@", bsdName];
} }
NSString *bsdName = [NSString stringWithUTF8String:(char *)volumeParms.vMDeviceID]; return @"";
return [NSString stringWithFormat:@"/dev/r%@", bsdName];
} }
- (char *)getVolumeTypeFromMountPath:(NSString *)mountPath - (char *)getVolumeTypeFromMountPath:(NSString *)mountPath
...@@ -776,7 +776,7 @@ static VLCOpen *_o_sharedMainInstance = nil; ...@@ -776,7 +776,7 @@ static VLCOpen *_o_sharedMainInstance = nil;
BOOL isDir; BOOL isDir;
if ([fm fileExistsAtPath:fullPath isDirectory:&isDir] && isDir) if ([fm fileExistsAtPath:fullPath isDirectory:&isDir] && isDir)
{ {
if ([currentFile caseInsensitiveCompare:@"SVCD"] == NSOrderedSame) if ([currentFile caseInsensitiveCompare:@"SVCD"] == NSOrderedSame)
{ {
returnValue = kVLCMediaSVCD; returnValue = kVLCMediaSVCD;
......
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