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
3c2c9364
Commit
3c2c9364
authored
Aug 16, 2014
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Handle NULL value in "input-current" callback
parent
ad30beea
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
15 deletions
+25
-15
modules/control/gestures.c
modules/control/gestures.c
+6
-2
modules/control/netsync.c
modules/control/netsync.c
+12
-8
modules/gui/skins2/src/vlcproc.cpp
modules/gui/skins2/src/vlcproc.cpp
+7
-5
No files found.
modules/control/gestures.c
View file @
3c2c9364
...
...
@@ -508,8 +508,12 @@ static int PlaylistEvent( vlc_object_t *p_this, char const *psz_var,
(
void
)
p_this
;
(
void
)
psz_var
;
(
void
)
oldval
;
var_AddCallback
(
p_input
,
"intf-event"
,
InputEvent
,
p_intf
);
assert
(
p_sys
->
p_input
==
NULL
);
p_sys
->
p_input
=
vlc_object_hold
(
p_input
);
if
(
p_input
!=
NULL
)
{
var_AddCallback
(
p_input
,
"intf-event"
,
InputEvent
,
p_intf
);
p_sys
->
p_input
=
vlc_object_hold
(
p_input
);
}
return
VLC_SUCCESS
;
}
modules/control/netsync.c
View file @
3c2c9364
...
...
@@ -289,17 +289,21 @@ static int PlaylistEvent(vlc_object_t *object, char const *cmd,
VLC_UNUSED
(
cmd
);
VLC_UNUSED
(
oldval
);
VLC_UNUSED
(
object
);
intf_thread_t
*
intf
=
data
;
intf_sys_t
*
sys
=
intf
->
p_sys
;
input_thread_t
*
input
=
newval
.
p_address
;
assert
(
sys
->
input
==
NULL
);
sys
->
input
=
vlc_object_hold
(
input
);
if
(
vlc_clone
(
&
sys
->
thread
,
sys
->
is_master
?
Master
:
Slave
,
intf
,
VLC_THREAD_PRIORITY_INPUT
))
{
vlc_object_release
(
input
);
sys
->
input
=
NULL
;
return
VLC_SUCCESS
;
if
(
input
!=
NULL
)
{
sys
->
input
=
vlc_object_hold
(
input
);
if
(
vlc_clone
(
&
sys
->
thread
,
sys
->
is_master
?
Master
:
Slave
,
intf
,
VLC_THREAD_PRIORITY_INPUT
))
{
vlc_object_release
(
input
);
sys
->
input
=
NULL
;
return
VLC_SUCCESS
;
}
var_AddCallback
(
input
,
"intf-event"
,
InputEvent
,
intf
);
}
var_AddCallback
(
input
,
"intf-event"
,
InputEvent
,
intf
);
return
VLC_SUCCESS
;
}
modules/gui/skins2/src/vlcproc.cpp
View file @
3c2c9364
...
...
@@ -227,11 +227,13 @@ int VlcProc::onInputNew( vlc_object_t *pObj, const char *pVariable,
VlcProc
*
pThis
=
(
VlcProc
*
)
pParam
;
input_thread_t
*
pInput
=
static_cast
<
input_thread_t
*>
(
newval
.
p_address
);
var_AddCallback
(
pInput
,
"intf-event"
,
onGenericCallback2
,
pThis
);
var_AddCallback
(
pInput
,
"bit-rate"
,
onGenericCallback
,
pThis
);
var_AddCallback
(
pInput
,
"sample-rate"
,
onGenericCallback
,
pThis
);
var_AddCallback
(
pInput
,
"can-record"
,
onGenericCallback
,
pThis
);
if
(
pInput
!=
NULL
)
{
var_AddCallback
(
pInput
,
"intf-event"
,
onGenericCallback2
,
pThis
);
var_AddCallback
(
pInput
,
"bit-rate"
,
onGenericCallback
,
pThis
);
var_AddCallback
(
pInput
,
"sample-rate"
,
onGenericCallback
,
pThis
);
var_AddCallback
(
pInput
,
"can-record"
,
onGenericCallback
,
pThis
);
}
return
VLC_SUCCESS
;
}
...
...
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