Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
2d667c6e
Commit
2d667c6e
authored
Apr 04, 2011
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CreateDecoder: common sub-expression
parent
60ab318b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
26 deletions
+27
-26
src/input/decoder.c
src/input/decoder.c
+27
-26
No files found.
src/input/decoder.c
View file @
2d667c6e
...
...
@@ -738,29 +738,30 @@ static decoder_t * CreateDecoder( input_thread_t *p_input,
/* Allocate our private structure for the decoder */
p_dec
->
p_owner
=
p_owner
=
malloc
(
sizeof
(
decoder_owner_sys_t
)
);
if
(
p_dec
->
p_owner
==
NULL
)
if
(
unlikely
(
p_owner
==
NULL
)
)
{
vlc_object_release
(
p_dec
);
return
NULL
;
}
p_
dec
->
p_
owner
->
i_preroll_end
=
VLC_TS_INVALID
;
p_
dec
->
p_
owner
->
i_last_rate
=
INPUT_RATE_DEFAULT
;
p_
dec
->
p_
owner
->
p_input
=
p_input
;
p_
dec
->
p_
owner
->
p_aout
=
NULL
;
p_
dec
->
p_
owner
->
p_aout_input
=
NULL
;
p_
dec
->
p_
owner
->
p_vout
=
NULL
;
p_
dec
->
p_
owner
->
p_spu_vout
=
NULL
;
p_
dec
->
p_
owner
->
i_spu_channel
=
0
;
p_
dec
->
p_
owner
->
i_spu_order
=
0
;
p_
dec
->
p_
owner
->
p_sout
=
p_sout
;
p_
dec
->
p_
owner
->
p_sout_input
=
NULL
;
p_
dec
->
p_
owner
->
p_packetizer
=
NULL
;
p_
dec
->
p_
owner
->
b_packetizer
=
b_packetizer
;
p_owner
->
i_preroll_end
=
VLC_TS_INVALID
;
p_owner
->
i_last_rate
=
INPUT_RATE_DEFAULT
;
p_owner
->
p_input
=
p_input
;
p_owner
->
p_aout
=
NULL
;
p_owner
->
p_aout_input
=
NULL
;
p_owner
->
p_vout
=
NULL
;
p_owner
->
p_spu_vout
=
NULL
;
p_owner
->
i_spu_channel
=
0
;
p_owner
->
i_spu_order
=
0
;
p_owner
->
p_sout
=
p_sout
;
p_owner
->
p_sout_input
=
NULL
;
p_owner
->
p_packetizer
=
NULL
;
p_owner
->
b_packetizer
=
b_packetizer
;
/* decoder fifo */
if
(
(
p_dec
->
p_owner
->
p_fifo
=
block_FifoNew
()
)
==
NULL
)
p_owner
->
p_fifo
=
block_FifoNew
();
if
(
unlikely
(
p_owner
->
p_fifo
==
NULL
)
)
{
free
(
p_
dec
->
p_
owner
);
free
(
p_owner
);
vlc_object_release
(
p_dec
);
return
NULL
;
}
...
...
@@ -791,27 +792,27 @@ static decoder_t * CreateDecoder( input_thread_t *p_input,
if
(
!
b_packetizer
&&
p_dec
->
b_need_packetized
&&
!
p_dec
->
fmt_in
.
b_packetized
)
{
p_
dec
->
p_
owner
->
p_packetizer
=
p_owner
->
p_packetizer
=
vlc_custom_create
(
p_input
,
sizeof
(
decoder_t
),
VLC_OBJECT_DECODER
,
"packetizer"
);
if
(
p_
dec
->
p_
owner
->
p_packetizer
)
if
(
p_owner
->
p_packetizer
)
{
es_format_Copy
(
&
p_
dec
->
p_
owner
->
p_packetizer
->
fmt_in
,
es_format_Copy
(
&
p_owner
->
p_packetizer
->
fmt_in
,
&
p_dec
->
fmt_in
);
es_format_Copy
(
&
p_
dec
->
p_
owner
->
p_packetizer
->
fmt_out
,
es_format_Copy
(
&
p_owner
->
p_packetizer
->
fmt_out
,
&
null_es_format
);
vlc_object_attach
(
p_
dec
->
p_
owner
->
p_packetizer
,
p_input
);
vlc_object_attach
(
p_owner
->
p_packetizer
,
p_input
);
p_
dec
->
p_
owner
->
p_packetizer
->
p_module
=
module_need
(
p_
dec
->
p_
owner
->
p_packetizer
,
p_owner
->
p_packetizer
->
p_module
=
module_need
(
p_owner
->
p_packetizer
,
"packetizer"
,
"$packetizer"
,
false
);
if
(
!
p_
dec
->
p_
owner
->
p_packetizer
->
p_module
)
if
(
!
p_owner
->
p_packetizer
->
p_module
)
{
es_format_Clean
(
&
p_
dec
->
p_
owner
->
p_packetizer
->
fmt_in
);
vlc_object_release
(
p_
dec
->
p_
owner
->
p_packetizer
);
es_format_Clean
(
&
p_owner
->
p_packetizer
->
fmt_in
);
vlc_object_release
(
p_owner
->
p_packetizer
);
}
}
}
...
...
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