Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VLC
Manage
Activity
Members
Labels
Plan
Issues
4k
Issue boards
Milestones
Code
Merge requests
451
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VideoLAN
VLC
Commits
bc4fafb7
Commit
bc4fafb7
authored
4 years ago
by
Rémi Denis-Courmont
Browse files
Options
Downloads
Patches
Plain Diff
duplicate: simplify select= handling
parent
1f38cbdd
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#27327
passed with stages
in 22 minutes and 26 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/stream_out/duplicate.c
+8
-6
8 additions, 6 deletions
modules/stream_out/duplicate.c
with
8 additions
and
6 deletions
modules/stream_out/duplicate.c
+
8
−
6
View file @
bc4fafb7
...
...
@@ -131,6 +131,8 @@ static int Open( vlc_object_t *p_this )
TAB_INIT
(
p_sys
->
i_nb_last_streams
,
p_sys
->
pp_last_streams
);
TAB_INIT
(
p_sys
->
i_nb_select
,
p_sys
->
ppsz_select
);
char
**
ppsz_select
=
NULL
;
for
(
p_cfg
=
p_stream
->
p_cfg
;
p_cfg
!=
NULL
;
p_cfg
=
p_cfg
->
p_next
)
{
if
(
!
strncmp
(
p_cfg
->
psz_name
,
"dst"
,
strlen
(
"dst"
)
)
)
...
...
@@ -147,24 +149,24 @@ static int Open( vlc_object_t *p_this )
TAB_APPEND
(
p_sys
->
i_nb_last_streams
,
p_sys
->
pp_last_streams
,
p_last
);
TAB_APPEND
(
p_sys
->
i_nb_select
,
p_sys
->
ppsz_select
,
NULL
);
ppsz_select
=
&
p_sys
->
ppsz_select
[
p_sys
->
i_nb_select
-
1
];
}
}
else
if
(
!
strncmp
(
p_cfg
->
psz_name
,
"select"
,
strlen
(
"select"
)
)
)
{
char
*
psz
=
p_cfg
->
psz_value
;
if
(
p_sys
->
i_nb_select
>
0
&&
psz
&&
*
psz
)
{
char
**
ppsz_select
=
&
p_sys
->
ppsz_select
[
p_sys
->
i_nb_select
-
1
];
if
(
*
ppsz_select
)
if
(
psz
&&
*
psz
)
{
if
(
ppsz_select
==
NULL
)
{
msg_Err
(
p_stream
,
" * ignore selection `%s' (it already has `%s')"
,
psz
,
*
ppsz_select
);
msg_Err
(
p_stream
,
" * ignore selection `%s'"
,
psz
);
}
else
{
msg_Dbg
(
p_stream
,
" * apply selection `%s'"
,
psz
);
*
ppsz_select
=
strdup
(
psz
);
ppsz_select
=
NULL
;
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment