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
b10e5817
Commit
b10e5817
authored
May 30, 2012
by
David Fuhrmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
growl: fix crash and duplicated notifications in some cases
parent
894b9dfb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
21 deletions
+9
-21
modules/notify/growl.m
modules/notify/growl.m
+9
-21
No files found.
modules/notify/growl.m
View file @
b10e5817
...
@@ -167,19 +167,22 @@ static int ItemChange( vlc_object_t *p_this, const char *psz_var,
...
@@ -167,19 +167,22 @@ static int ItemChange( vlc_object_t *p_this, const char *psz_var,
/* Don't update each time an item has been preparsed */
/* Don't update each time an item has been preparsed */
if
(
b_is_item_current
)
if
(
b_is_item_current
)
{
/* stores the current input item id */
{
/* stores the current input item id */
p_intf
->
p_sys
->
i_id
=
p_item
->
i_id
;
if
(
p_intf
->
p_sys
->
i_id
!=
p_item
->
i_id
)
p_intf
->
p_sys
->
i_item_changes
=
0
;
{
p_intf
->
p_sys
->
i_id
=
p_item
->
i_id
;
p_intf
->
p_sys
->
i_item_changes
=
0
;
}
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
}
}
/* ignore items which weren't pre-parsed yet */
/* ignore items which weren't pre-parsed yet */
else
if
(
!
input_item_IsPreparsed
(
p_item
)
)
else
if
(
!
input_item_IsPreparsed
(
p_item
)
)
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
else
else
{
{
/* "item-change" */
if
(
p_item
->
i_id
!=
p_intf
->
p_sys
->
i_id
)
{
/* "item-change" */
p_intf
->
p_sys
->
i_item_changes
=
0
;
if
(
p_item
->
i_id
!=
p_intf
->
p_sys
->
i_id
)
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
}
/* Some variable bitrate inputs call "item-change" callbacks each time
/* Some variable bitrate inputs call "item-change" callbacks each time
* their length is updated, that is several times per second.
* their length is updated, that is several times per second.
* We'll limit the number of changes to 1 per input. */
* We'll limit the number of changes to 1 per input. */
...
@@ -189,18 +192,6 @@ static int ItemChange( vlc_object_t *p_this, const char *psz_var,
...
@@ -189,18 +192,6 @@ static int ItemChange( vlc_object_t *p_this, const char *psz_var,
p_intf
->
p_sys
->
i_item_changes
++
;
p_intf
->
p_sys
->
i_item_changes
++
;
}
}
input_thread_t
*
p_input
=
playlist_CurrentInput
(
(
playlist_t
*
)
p_this
);
if
(
!
p_input
)
return
VLC_SUCCESS
;
if
(
p_input
->
b_dead
||
!
input_GetItem
(
p_input
)
->
psz_name
)
{
/* Not playing anything ... */
vlc_object_release
(
p_input
);
return
VLC_SUCCESS
;
}
/* Playing something ... */
/* Playing something ... */
if
(
input_item_GetNowPlaying
(
p_item
)
)
if
(
input_item_GetNowPlaying
(
p_item
)
)
psz_title
=
input_item_GetNowPlaying
(
p_item
);
psz_title
=
input_item_GetNowPlaying
(
p_item
);
...
@@ -209,7 +200,6 @@ static int ItemChange( vlc_object_t *p_this, const char *psz_var,
...
@@ -209,7 +200,6 @@ static int ItemChange( vlc_object_t *p_this, const char *psz_var,
if
(
EMPTY_STR
(
psz_title
)
)
if
(
EMPTY_STR
(
psz_title
)
)
{
{
free
(
psz_title
);
free
(
psz_title
);
vlc_object_release
(
p_input
);
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
}
}
...
@@ -232,7 +222,6 @@ static int ItemChange( vlc_object_t *p_this, const char *psz_var,
...
@@ -232,7 +222,6 @@ static int ItemChange( vlc_object_t *p_this, const char *psz_var,
free
(
psz_title
);
free
(
psz_title
);
free
(
psz_artist
);
free
(
psz_artist
);
free
(
psz_album
);
free
(
psz_album
);
vlc_object_release
(
p_input
);
return
VLC_ENOMEM
;
return
VLC_ENOMEM
;
}
}
...
@@ -252,7 +241,6 @@ static int ItemChange( vlc_object_t *p_this, const char *psz_var,
...
@@ -252,7 +241,6 @@ static int ItemChange( vlc_object_t *p_this, const char *psz_var,
free
(
psz_arturl
);
free
(
psz_arturl
);
free
(
psz_tmp
);
free
(
psz_tmp
);
vlc_object_release
(
p_input
);
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