Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
addc5f26
Commit
addc5f26
authored
Feb 19, 2014
by
Felix Abecassis
Committed by
Jean-Baptiste Kempf
Feb 19, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mediacodec: add more safety checks when trying to get codec capabilities
Signed-off-by:
Jean-Baptiste Kempf
<
jb@videolan.org
>
parent
93f201fb
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
modules/codec/omxil/android_mediacodec.c
modules/codec/omxil/android_mediacodec.c
+7
-2
No files found.
modules/codec/omxil/android_mediacodec.c
View file @
addc5f26
...
@@ -310,8 +310,13 @@ static int OpenDecoder(vlc_object_t *p_this)
...
@@ -310,8 +310,13 @@ static int OpenDecoder(vlc_object_t *p_this)
jobject
codec_capabilities
=
(
*
env
)
->
CallObjectMethod
(
env
,
info
,
p_sys
->
get_capabilities_for_type
,
jobject
codec_capabilities
=
(
*
env
)
->
CallObjectMethod
(
env
,
info
,
p_sys
->
get_capabilities_for_type
,
(
*
env
)
->
NewStringUTF
(
env
,
mime
));
(
*
env
)
->
NewStringUTF
(
env
,
mime
));
jobject
profile_levels
=
(
*
env
)
->
GetObjectField
(
env
,
codec_capabilities
,
p_sys
->
profile_levels_field
);
jobject
profile_levels
=
NULL
;
int
profile_levels_len
=
profile_levels
?
(
*
env
)
->
GetArrayLength
(
env
,
profile_levels
)
:
0
;
int
profile_levels_len
=
0
;
if
(
codec_capabilities
)
{
profile_levels
=
(
*
env
)
->
GetObjectField
(
env
,
codec_capabilities
,
p_sys
->
profile_levels_field
);
if
(
profile_levels
)
profile_levels_len
=
(
*
env
)
->
GetArrayLength
(
env
,
profile_levels
);
}
msg_Dbg
(
p_dec
,
"Number of profile levels: %d"
,
profile_levels_len
);
msg_Dbg
(
p_dec
,
"Number of profile levels: %d"
,
profile_levels_len
);
jobject
types
=
(
*
env
)
->
CallObjectMethod
(
env
,
info
,
p_sys
->
get_supported_types
);
jobject
types
=
(
*
env
)
->
CallObjectMethod
(
env
,
info
,
p_sys
->
get_supported_types
);
...
...
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