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
04a366e3
Commit
04a366e3
authored
Aug 15, 2014
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
input: deduplicate code
parent
fdb9f79e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
19 deletions
+15
-19
src/input/input.c
src/input/input.c
+15
-19
No files found.
src/input/input.c
View file @
04a366e3
...
...
@@ -92,7 +92,7 @@ static void SlaveDemux( input_thread_t *p_input, bool *pb_demux_polled );
static
void
SlaveSeek
(
input_thread_t
*
p_input
);
static
void
InputMetaUser
(
input_thread_t
*
p_input
,
vlc_meta_t
*
p_meta
);
static
void
InputUpdateMeta
(
input_thread_t
*
p_input
,
vlc_meta_t
*
p_meta
);
static
void
InputUpdateMeta
(
input_thread_t
*
p_input
,
demux_t
*
p_demux
);
static
void
InputGetExtraFiles
(
input_thread_t
*
p_input
,
int
*
pi_list
,
char
***
pppsz_list
,
const
char
*
psz_access
,
const
char
*
psz_path
);
...
...
@@ -1954,7 +1954,6 @@ static bool Control( input_thread_t *p_input,
if
(
slave
&&
!
InputSourceInit
(
p_input
,
slave
,
uri
,
NULL
,
false
)
)
{
vlc_meta_t
*
p_meta
;
int64_t
i_time
;
/* Add the slave */
...
...
@@ -1979,12 +1978,7 @@ static bool Control( input_thread_t *p_input,
}
/* Get meta (access and demux) */
p_meta
=
vlc_meta_New
();
if
(
p_meta
)
{
demux_Control
(
slave
->
p_demux
,
DEMUX_GET_META
,
p_meta
);
InputUpdateMeta
(
p_input
,
p_meta
);
}
InputUpdateMeta
(
p_input
,
slave
->
p_demux
);
TAB_APPEND
(
p_input
->
p
->
i_slave
,
p_input
->
p
->
slave
,
slave
);
}
...
...
@@ -2140,12 +2134,7 @@ static void UpdateGenericFromDemux( input_thread_t *p_input )
if
(
p_demux
->
info
.
i_update
&
INPUT_UPDATE_META
)
{
vlc_meta_t
*
p_meta
=
vlc_meta_New
();
if
(
p_meta
)
{
demux_Control
(
p_input
->
p
->
input
.
p_demux
,
DEMUX_GET_META
,
p_meta
);
InputUpdateMeta
(
p_input
,
p_meta
);
}
InputUpdateMeta
(
p_input
,
p_demux
);
p_demux
->
info
.
i_update
&=
~
INPUT_UPDATE_META
;
}
{
...
...
@@ -2716,14 +2705,20 @@ static void AppendAttachment( int *pi_attachment, input_attachment_t ***ppp_atta
* InputUpdateMeta: merge p_item meta data with p_meta taking care of
* arturl and locking issue.
*****************************************************************************/
static
void
InputUpdateMeta
(
input_thread_t
*
p_input
,
vlc_meta_t
*
p_meta
)
static
void
InputUpdateMeta
(
input_thread_t
*
p_input
,
demux_t
*
p_demux
)
{
vlc_meta_t
*
p_meta
=
vlc_meta_New
();
if
(
unlikely
(
p_meta
==
NULL
)
)
return
;
demux_Control
(
p_demux
,
DEMUX_GET_META
,
p_meta
);
/* If metadata changed, then the attachments might have changed.
We need to update them in case they contain album art. */
input_source_t
*
in
=
&
p_input
->
p
->
input
;
int
i_attachment
;
input_attachment_t
**
attachment
;
if
(
!
demux_Control
(
in
->
p_demux
,
DEMUX_GET_ATTACHMENTS
,
int
i_attachment
;
if
(
!
demux_Control
(
p_demux
,
DEMUX_GET_ATTACHMENTS
,
&
attachment
,
&
i_attachment
)
)
{
vlc_mutex_lock
(
&
p_input
->
p
->
p_item
->
lock
);
...
...
@@ -2737,6 +2732,7 @@ static void InputUpdateMeta( input_thread_t *p_input, vlc_meta_t *p_meta )
i_attachment
,
attachment
);
vlc_mutex_unlock
(
&
p_input
->
p
->
p_item
->
lock
);
}
es_out_ControlSetMeta
(
p_input
->
p
->
p_es_out
,
p_meta
);
vlc_meta_Delete
(
p_meta
);
}
...
...
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