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
f1c6b2db
Commit
f1c6b2db
authored
Mar 21, 2015
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
decoder: factor some common code into DecoderUpdateFormatLocked()
parent
24e00929
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
16 deletions
+13
-16
src/input/decoder.c
src/input/decoder.c
+13
-16
No files found.
src/input/decoder.c
View file @
f1c6b2db
...
@@ -138,13 +138,19 @@ static void DecoderUpdateFormatLocked( decoder_t *p_dec )
...
@@ -138,13 +138,19 @@ static void DecoderUpdateFormatLocked( decoder_t *p_dec )
vlc_assert_locked
(
&
p_owner
->
lock
);
vlc_assert_locked
(
&
p_owner
->
lock
);
p_owner
->
b_fmt_description
=
true
;
es_format_Clean
(
&
p_owner
->
fmt
);
es_format_Copy
(
&
p_owner
->
fmt
,
&
p_dec
->
fmt_out
);
/* Move p_description */
/* Move p_description */
if
(
p_owner
->
p_description
&&
p_dec
->
p_description
)
if
(
p_dec
->
p_description
!=
NULL
)
{
if
(
p_owner
->
p_description
!=
NULL
)
vlc_meta_Delete
(
p_owner
->
p_description
);
vlc_meta_Delete
(
p_owner
->
p_description
);
p_owner
->
p_description
=
p_dec
->
p_description
;
p_owner
->
p_description
=
p_dec
->
p_description
;
p_dec
->
p_description
=
NULL
;
p_dec
->
p_description
=
NULL
;
}
p_owner
->
b_fmt_description
=
true
;
}
}
static
bool
DecoderIsFlushing
(
decoder_t
*
p_dec
)
static
bool
DecoderIsFlushing
(
decoder_t
*
p_dec
)
...
@@ -273,11 +279,8 @@ static int aout_update_format( decoder_t *p_dec )
...
@@ -273,11 +279,8 @@ static int aout_update_format( decoder_t *p_dec )
p_owner
->
p_aout
=
p_aout
;
p_owner
->
p_aout
=
p_aout
;
es_format_Clean
(
&
p_owner
->
fmt
);
es_format_Copy
(
&
p_owner
->
fmt
,
&
p_dec
->
fmt_out
);
aout_FormatPrepare
(
&
p_owner
->
fmt
.
audio
);
DecoderUpdateFormatLocked
(
p_dec
);
DecoderUpdateFormatLocked
(
p_dec
);
aout_FormatPrepare
(
&
p_owner
->
fmt
.
audio
);
if
(
unlikely
(
p_owner
->
b_paused
)
&&
p_aout
!=
NULL
)
if
(
unlikely
(
p_owner
->
b_paused
)
&&
p_aout
!=
NULL
)
/* fake pause if needed */
/* fake pause if needed */
...
@@ -415,12 +418,8 @@ static int vout_update_format( decoder_t *p_dec )
...
@@ -415,12 +418,8 @@ static int vout_update_format( decoder_t *p_dec )
vlc_mutex_lock
(
&
p_owner
->
lock
);
vlc_mutex_lock
(
&
p_owner
->
lock
);
p_owner
->
p_vout
=
p_vout
;
p_owner
->
p_vout
=
p_vout
;
es_format_Clean
(
&
p_owner
->
fmt
);
es_format_Copy
(
&
p_owner
->
fmt
,
&
p_dec
->
fmt_out
);
p_owner
->
fmt
.
video
.
i_chroma
=
p_dec
->
fmt_out
.
i_codec
;
DecoderUpdateFormatLocked
(
p_dec
);
DecoderUpdateFormatLocked
(
p_dec
);
p_owner
->
fmt
.
video
.
i_chroma
=
p_dec
->
fmt_out
.
i_codec
;
vlc_mutex_unlock
(
&
p_owner
->
lock
);
vlc_mutex_unlock
(
&
p_owner
->
lock
);
if
(
p_owner
->
p_input
!=
NULL
)
if
(
p_owner
->
p_input
!=
NULL
)
...
@@ -779,8 +778,6 @@ static void DecoderProcessSout( decoder_t *p_dec, block_t *p_block )
...
@@ -779,8 +778,6 @@ static void DecoderProcessSout( decoder_t *p_dec, block_t *p_block )
if
(
p_owner
->
p_sout_input
==
NULL
)
if
(
p_owner
->
p_sout_input
==
NULL
)
{
{
vlc_mutex_lock
(
&
p_owner
->
lock
);
vlc_mutex_lock
(
&
p_owner
->
lock
);
es_format_Clean
(
&
p_owner
->
fmt
);
es_format_Copy
(
&
p_owner
->
fmt
,
&
p_dec
->
fmt_out
);
DecoderUpdateFormatLocked
(
p_dec
);
DecoderUpdateFormatLocked
(
p_dec
);
vlc_mutex_unlock
(
&
p_owner
->
lock
);
vlc_mutex_unlock
(
&
p_owner
->
lock
);
...
...
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