Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
d5959bcc
Commit
d5959bcc
authored
Sep 14, 2008
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Another thread-unsafe redumdant use of b_dead
parent
36e37a19
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
12 deletions
+6
-12
modules/misc/notify/telepathy.c
modules/misc/notify/telepathy.c
+6
-12
No files found.
modules/misc/notify/telepathy.c
View file @
d5959bcc
...
@@ -135,16 +135,9 @@ static int Open( vlc_object_t *p_this )
...
@@ -135,16 +135,9 @@ static int Open( vlc_object_t *p_this )
*****************************************************************************/
*****************************************************************************/
static
void
Close
(
vlc_object_t
*
p_this
)
static
void
Close
(
vlc_object_t
*
p_this
)
{
{
p_this
->
b_dead
=
true
;
intf_thread_t
*
p_intf
=
(
intf_thread_t
*
)
p_this
;
intf_thread_t
*
p_intf
=
(
intf_thread_t
*
)
p_this
;
playlist_t
*
p_playlist
=
pl_Yield
(
p_this
);
playlist_t
*
p_playlist
=
pl_Yield
(
p_this
);
/* Clears the Presence message ... else it looks like we're still playing
* something although VLC (or the Telepathy plugin) is closed */
/* Do not check for VLC_ENOMEM as we're closing */
SendToTelepathy
(
p_intf
,
""
);
PL_LOCK
;
PL_LOCK
;
var_DelCallback
(
p_playlist
,
"item-change"
,
ItemChange
,
p_intf
);
var_DelCallback
(
p_playlist
,
"item-change"
,
ItemChange
,
p_intf
);
var_DelCallback
(
p_playlist
,
"playlist-current"
,
ItemChange
,
p_intf
);
var_DelCallback
(
p_playlist
,
"playlist-current"
,
ItemChange
,
p_intf
);
...
@@ -153,6 +146,12 @@ static void Close( vlc_object_t *p_this )
...
@@ -153,6 +146,12 @@ static void Close( vlc_object_t *p_this )
PL_UNLOCK
;
PL_UNLOCK
;
pl_Release
(
p_this
);
pl_Release
(
p_this
);
/* Clears the Presence message ... else it looks like we're still playing
* something although VLC (or the Telepathy plugin) is closed */
/* Do not check for VLC_ENOMEM as we're closing */
SendToTelepathy
(
p_intf
,
""
);
/* we won't use the DBus connection anymore */
/* we won't use the DBus connection anymore */
dbus_connection_unref
(
p_intf
->
p_sys
->
p_conn
);
dbus_connection_unref
(
p_intf
->
p_sys
->
p_conn
);
...
@@ -173,9 +172,6 @@ static int ItemChange( vlc_object_t *p_this, const char *psz_var,
...
@@ -173,9 +172,6 @@ static int ItemChange( vlc_object_t *p_this, const char *psz_var,
char
*
psz_buf
=
NULL
;
char
*
psz_buf
=
NULL
;
input_thread_t
*
p_input
;
input_thread_t
*
p_input
;
if
(
p_intf
->
b_dead
)
return
VLC_EGENERIC
;
/* Don't update Telepathy presence each time an item has been preparsed */
/* Don't update Telepathy presence each time an item has been preparsed */
if
(
!
strncmp
(
"playlist-current"
,
psz_var
,
16
)
)
if
(
!
strncmp
(
"playlist-current"
,
psz_var
,
16
)
)
{
/* stores the current input item id */
{
/* stores the current input item id */
...
@@ -239,8 +235,6 @@ static int StateChange( vlc_object_t *p_this, const char *psz_var,
...
@@ -239,8 +235,6 @@ static int StateChange( vlc_object_t *p_this, const char *psz_var,
{
{
VLC_UNUSED
(
p_this
);
VLC_UNUSED
(
psz_var
);
VLC_UNUSED
(
oldval
);
VLC_UNUSED
(
p_this
);
VLC_UNUSED
(
psz_var
);
VLC_UNUSED
(
oldval
);
intf_thread_t
*
p_intf
=
(
intf_thread_t
*
)
param
;
intf_thread_t
*
p_intf
=
(
intf_thread_t
*
)
param
;
if
(
p_intf
->
b_dead
)
return
VLC_EGENERIC
;
if
(
newval
.
i_int
>=
END_S
)
if
(
newval
.
i_int
>=
END_S
)
return
SendToTelepathy
(
p_intf
,
""
);
return
SendToTelepathy
(
p_intf
,
""
);
return
VLC_SUCCESS
;
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