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
f56a6495
Commit
f56a6495
authored
Jul 29, 2015
by
Thomas Guillem
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mediacodec: use p_sys in OpenDecoder
parent
5941dc1b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
10 deletions
+12
-10
modules/codec/omxil/mediacodec.c
modules/codec/omxil/mediacodec.c
+12
-10
No files found.
modules/codec/omxil/mediacodec.c
View file @
f56a6495
...
...
@@ -511,6 +511,7 @@ static void StopMediaCodec(decoder_t *p_dec)
static
int
OpenDecoder
(
vlc_object_t
*
p_this
,
pf_MediaCodecApi_init
pf_init
)
{
decoder_t
*
p_dec
=
(
decoder_t
*
)
p_this
;
decoder_sys_t
*
p_sys
;
mc_api
*
api
;
const
char
*
mime
=
NULL
;
...
...
@@ -594,13 +595,14 @@ static int OpenDecoder(vlc_object_t *p_this, pf_MediaCodecApi_init pf_init)
}
/* Allocate the memory needed to store the decoder's structure */
if
((
p_
dec
->
p_sys
=
calloc
(
1
,
sizeof
(
*
p_dec
->
p_sys
)))
==
NULL
)
if
((
p_
sys
=
calloc
(
1
,
sizeof
(
*
p_sys
)))
==
NULL
)
{
api
->
clean
(
api
);
free
(
api
);
return
VLC_ENOMEM
;
}
p_dec
->
p_sys
->
api
=
api
;
p_sys
->
api
=
api
;
p_dec
->
p_sys
=
p_sys
;
p_dec
->
pf_decode_video
=
DecodeVideo
;
p_dec
->
pf_decode_audio
=
DecodeAudio
;
...
...
@@ -609,16 +611,16 @@ static int OpenDecoder(vlc_object_t *p_this, pf_MediaCodecApi_init pf_init)
p_dec
->
fmt_out
.
video
=
p_dec
->
fmt_in
.
video
;
p_dec
->
fmt_out
.
audio
=
p_dec
->
fmt_in
.
audio
;
p_dec
->
b_need_packetized
=
true
;
p_
dec
->
p_
sys
->
mime
=
mime
;
p_
dec
->
p_
sys
->
b_new_block
=
true
;
p_sys
->
mime
=
mime
;
p_sys
->
b_new_block
=
true
;
if
(
p_dec
->
fmt_in
.
i_cat
==
VIDEO_ES
)
{
p_
dec
->
p_
sys
->
u
.
video
.
i_width
=
p_dec
->
fmt_in
.
video
.
i_width
;
p_
dec
->
p_
sys
->
u
.
video
.
i_height
=
p_dec
->
fmt_in
.
video
.
i_height
;
p_sys
->
u
.
video
.
i_width
=
p_dec
->
fmt_in
.
video
.
i_width
;
p_sys
->
u
.
video
.
i_height
=
p_dec
->
fmt_in
.
video
.
i_height
;
p_
dec
->
p_
sys
->
u
.
video
.
timestamp_fifo
=
timestamp_FifoNew
(
32
);
if
(
!
p_
dec
->
p_
sys
->
u
.
video
.
timestamp_fifo
)
p_sys
->
u
.
video
.
timestamp_fifo
=
timestamp_FifoNew
(
32
);
if
(
!
p_sys
->
u
.
video
.
timestamp_fifo
)
{
CloseDecoder
(
p_this
);
return
VLC_ENOMEM
;
...
...
@@ -627,7 +629,7 @@ static int OpenDecoder(vlc_object_t *p_this, pf_MediaCodecApi_init pf_init)
switch
(
p_dec
->
fmt_in
.
i_codec
)
{
case
VLC_CODEC_H264
:
if
(
!
p_
dec
->
p_sys
->
u
.
video
.
i_width
||
!
p_dec
->
p_sys
->
u
.
video
.
i_height
)
if
(
!
p_
sys
->
u
.
video
.
i_width
||
!
p_sys
->
u
.
video
.
i_height
)
{
msg_Warn
(
p_dec
,
"waiting for sps/pps for codec %4.4s"
,
(
const
char
*
)
&
p_dec
->
fmt_in
.
i_codec
);
...
...
@@ -645,7 +647,7 @@ static int OpenDecoder(vlc_object_t *p_this, pf_MediaCodecApi_init pf_init)
}
else
{
p_
dec
->
p_
sys
->
u
.
audio
.
i_channels
=
p_dec
->
fmt_in
.
audio
.
i_channels
;
p_sys
->
u
.
audio
.
i_channels
=
p_dec
->
fmt_in
.
audio
.
i_channels
;
switch
(
p_dec
->
fmt_in
.
i_codec
)
{
...
...
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