Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VLC
Manage
Activity
Members
Labels
Plan
Issues
4k
Issue boards
Milestones
Code
Merge requests
450
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VideoLAN
VLC
Commits
c7062b8a
Commit
c7062b8a
authored
5 years ago
by
Felix Paul Kühne
Browse files
Options
Downloads
Patches
Plain Diff
macosx: fix playback of block based media
This solves a regression introduced in
535112f6
parent
e06b5ca3
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/gui/macosx/extensions/NSString+Helpers.m
+11
-4
11 additions, 4 deletions
modules/gui/macosx/extensions/NSString+Helpers.m
with
11 additions
and
4 deletions
modules/gui/macosx/extensions/NSString+Helpers.m
+
11
−
4
View file @
c7062b8a
...
...
@@ -300,10 +300,14 @@ NSString * getVolumeTypeFromMountPath(NSString *mountPath)
return
@""
;
}
CFMutableDictionaryRef
matchingDict
=
IOBSDNameMatching
(
kIOMasterPortDefault
,
0
,
stf
.
f_mntfromname
);
io_service_t
service
=
IOServiceGetMatchingService
(
kIOMasterPortDefault
,
matchingDict
);
/* the matching dictionary wants the BSD name without its path, so strip it */
NSString
*
bsdMount
=
[
NSString
stringWithUTF8String
:
stf
.
f_mntfromname
];
NSString
*
bsdName
=
[
bsdMount
lastPathComponent
];
CFMutableDictionaryRef
matchingDict
=
IOBSDNameMatching
(
kIOMasterPortDefault
,
0
,
[
bsdName
UTF8String
]);
NSString
*
returnValue
;
io_service_t
service
=
IOServiceGetMatchingService
(
kIOMasterPortDefault
,
matchingDict
);
if
(
IO_OBJECT_NULL
!=
service
)
{
if
(
IOObjectConformsTo
(
service
,
kIOCDMediaClass
))
returnValue
=
kVLCMediaAudioCD
;
...
...
@@ -317,7 +321,6 @@ NSString * getVolumeTypeFromMountPath(NSString *mountPath)
return
returnValue
;
}
out:
if
([
mountPath
rangeOfString
:
@"VIDEO_TS"
options
:
NSCaseInsensitiveSearch
|
NSBackwardsSearch
].
location
!=
NSNotFound
)
returnValue
=
kVLCMediaVideoTSFolder
;
else
if
([
mountPath
rangeOfString
:
@"BDMV"
options
:
NSCaseInsensitiveSearch
|
NSBackwardsSearch
].
location
!=
NSNotFound
)
...
...
@@ -367,8 +370,12 @@ NSString * getBSDNodeFromMountPath(NSString *mountPath)
if
(
ret
!=
0
)
{
return
@""
;
}
/* the provided BSD mount path doesn't include the r prefix we need */
NSString
*
bsdMount
=
[
NSString
stringWithUTF8String
:
stf
.
f_mntfromname
];
NSString
*
bsdName
=
[
bsdMount
lastPathComponent
];
NSString
*
fixedBsdName
=
[
NSString
stringWithFormat
:
@"/dev/r%@"
,
bsdName
];
return
[
NSString
stringWithFormat
:
@"r%s"
,
stf
.
f_mntfromn
ame
]
;
return
fixedBsdN
ame
;
}
NSString
*
OSXStringKeyToString
(
NSString
*
theString
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment