Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
VideoLAN
VLC-iOS
Commits
db9af945
Commit
db9af945
authored
Jun 10, 2013
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Movie Player: some codecs are region dependent, so disable audio if incompatible match is found
parent
f00cd01e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
0 deletions
+37
-0
AspenProject/VLCMovieViewController.m
AspenProject/VLCMovieViewController.m
+37
-0
No files found.
AspenProject/VLCMovieViewController.m
View file @
db9af945
...
...
@@ -173,6 +173,43 @@
[[
defaults
objectForKey
:
kVLCSettingStretchAudio
]
boolValue
]
?
kVLCSettingStretchAudioOnValue
:
kVLCSettingStretchAudioOffValue
,
kVLCSettingTextEncoding
:
[
defaults
objectForKey
:
kVLCSettingTextEncoding
]}];
NSLocale
*
locale
=
[
NSLocale
currentLocale
];
NSString
*
countryCode
=
[
locale
objectForKey
:
NSLocaleCountryCode
];
if
([
countryCode
isEqualToString
:
@"US"
]){
NSArray
*
tracksInfo
=
media
.
tracksInformation
;
for
(
NSUInteger
x
=
0
;
x
<
tracksInfo
.
count
;
x
++
)
{
if
([[
tracksInfo
[
x
]
objectForKey
:
VLCMediaTracksInformationType
]
isEqualToString
:
VLCMediaTracksInformationTypeAudio
])
{
NSInteger
fourcc
=
[[
tracksInfo
[
x
]
objectForKey
:
VLCMediaTracksInformationCodec
]
integerValue
];
switch
(
fourcc
)
{
case
540161377
:
case
1647457633
:
case
858612577
:
case
862151027
:
case
2126701
:
case
544437348
:
case
542331972
:
case
1651733604
:
case
1668510820
:
case
1702065252
:
case
1752396900
:
case
1819505764
:
case
18903917
:
case
862151013
:
{
[
media
addOptions
:@{
@"no-audio"
:
[
NSNull
null
]}];
APLog
(
@"audio playback disabled because an unsupported codec was found"
);
break
;
}
default:
break
;
}
}
}
}
[
_mediaPlayer
setMedia
:
media
];
self
.
positionSlider
.
value
=
0
.;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment