Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
928c9fa7
Commit
928c9fa7
authored
Feb 09, 2012
by
Rafaël Carré
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ts mux ActiveKeyCallback: reduce critical section
parent
46706e0a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
7 deletions
+16
-7
modules/mux/mpeg/ts.c
modules/mux/mpeg/ts.c
+16
-7
No files found.
modules/mux/mpeg/ts.c
View file @
928c9fa7
...
...
@@ -899,17 +899,26 @@ static int ActiveKeyCallback( vlc_object_t *p_this, char const *psz_cmd,
VLC_UNUSED
(
psz_cmd
);
VLC_UNUSED
(
oldval
);
VLC_UNUSED
(
p_data
);
sout_mux_t
*
p_mux
=
(
sout_mux_t
*
)
p_this
;
sout_mux_sys_t
*
p_sys
=
p_mux
->
p_sys
;
int
i_res
=
VLC_EBADVAR
;
int
i_res
,
use_odd
=
-
1
;
vlc_mutex_lock
(
&
p_sys
->
csa_lock
);
if
(
!
strcmp
(
newval
.
psz_string
,
"odd"
)
||
!
strcmp
(
newval
.
psz_string
,
"first"
)
||
!
strcmp
(
newval
.
psz_string
,
"1"
)
)
if
(
!
strcmp
(
newval
.
psz_string
,
"odd"
)
||
!
strcmp
(
newval
.
psz_string
,
"first"
)
||
!
strcmp
(
newval
.
psz_string
,
"1"
)
)
{
i_res
=
csa_UseKey
(
(
vlc_object_t
*
)
p_mux
,
p_sys
->
csa
,
1
)
;
use_odd
=
1
;
}
else
if
(
!
strcmp
(
newval
.
psz_string
,
"even"
)
||
!
strcmp
(
newval
.
psz_string
,
"second"
)
||
!
strcmp
(
newval
.
psz_string
,
"2"
)
)
else
if
(
!
strcmp
(
newval
.
psz_string
,
"even"
)
||
!
strcmp
(
newval
.
psz_string
,
"second"
)
||
!
strcmp
(
newval
.
psz_string
,
"2"
)
)
{
i_res
=
csa_UseKey
(
(
vlc_object_t
*
)
p_mux
,
p_sys
->
csa
,
0
)
;
use_odd
=
0
;
}
if
(
use_odd
<
0
)
return
VLC_EBADVAR
;
vlc_mutex_lock
(
&
p_sys
->
csa_lock
);
i_res
=
csa_UseKey
(
p_this
,
p_sys
->
csa
,
use_odd
);
vlc_mutex_unlock
(
&
p_sys
->
csa_lock
);
return
i_res
;
...
...
@@ -1159,7 +1168,7 @@ static int AddStream( sout_mux_t *p_mux, sout_input_t *p_input )
p_stream
->
lang
[
i
*
3
+
0
]
=
pl
->
psz_iso639_2T
[
0
];
p_stream
->
lang
[
i
*
3
+
1
]
=
pl
->
psz_iso639_2T
[
1
];
p_stream
->
lang
[
i
*
3
+
2
]
=
pl
->
psz_iso639_2T
[
2
];
msg_Dbg
(
p_mux
,
" - lang=%c%c%c"
,
p_stream
->
lang
[
i
*
3
+
0
],
p_stream
->
lang
[
i
*
3
+
1
],
p_stream
->
lang
[
i
*
3
+
2
]
);
...
...
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