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
e8289c83
Commit
e8289c83
authored
Feb 14, 2014
by
Felix Abecassis
Committed by
Jean-Baptiste Kempf
Feb 14, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mediacodec: add a NULL pointer check after getting the profileLevels field
Signed-off-by:
Jean-Baptiste Kempf
<
jb@videolan.org
>
parent
3ed3b149
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
modules/codec/omxil/android_mediacodec.c
modules/codec/omxil/android_mediacodec.c
+6
-5
No files found.
modules/codec/omxil/android_mediacodec.c
View file @
e8289c83
...
@@ -305,10 +305,11 @@ static int OpenDecoder(vlc_object_t *p_this)
...
@@ -305,10 +305,11 @@ static int OpenDecoder(vlc_object_t *p_this)
continue
;
continue
;
}
}
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
=
(
*
env
)
->
GetObjectField
(
env
,
codec_capabilities
,
p_sys
->
profile_levels_field
);
int
profile_levels_len
=
(
*
env
)
->
GetArrayLength
(
env
,
profile_levels
);
int
profile_levels_len
=
profile_levels
?
(
*
env
)
->
GetArrayLength
(
env
,
profile_levels
)
:
0
;
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
);
int
num_types
=
(
*
env
)
->
GetArrayLength
(
env
,
types
);
int
num_types
=
(
*
env
)
->
GetArrayLength
(
env
,
types
);
...
@@ -319,7 +320,7 @@ static int OpenDecoder(vlc_object_t *p_this)
...
@@ -319,7 +320,7 @@ static int OpenDecoder(vlc_object_t *p_this)
/* The mime type is matching for this component. We
/* The mime type is matching for this component. We
now check if the capabilities of the codec is
now check if the capabilities of the codec is
matching the video format. */
matching the video format. */
if
(
p_dec
->
fmt_in
.
i_codec
==
VLC_CODEC_H264
&&
fmt_profile
)
{
if
(
p_dec
->
fmt_in
.
i_codec
==
VLC_CODEC_H264
&&
fmt_profile
&&
profile_levels_len
)
{
for
(
int
i
=
0
;
i
<
profile_levels_len
&&
!
found
;
++
i
)
{
for
(
int
i
=
0
;
i
<
profile_levels_len
&&
!
found
;
++
i
)
{
jobject
profile_level
=
(
*
env
)
->
GetObjectArrayElement
(
env
,
profile_levels
,
i
);
jobject
profile_level
=
(
*
env
)
->
GetObjectArrayElement
(
env
,
profile_levels
,
i
);
...
...
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