[vlc-commits] playlist preparse and fetch: return error if appropriate
Rémi Denis-Courmont
git at videolan.org
Sun Jul 10 18:11:07 CEST 2011
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Jul 10 19:09:19 2011 +0300| [a838a72fa8b6131492e00c9030f4b7774f9b1116] | committer: Rémi Denis-Courmont
playlist preparse and fetch: return error if appropriate
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a838a72fa8b6131492e00c9030f4b7774f9b1116
---
src/playlist/control.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/playlist/control.c b/src/playlist/control.c
index c2f8171..855354d 100644
--- a/src/playlist/control.c
+++ b/src/playlist/control.c
@@ -203,9 +203,9 @@ int playlist_PreparseEnqueue( playlist_t *p_playlist, input_item_t *p_item )
{
playlist_private_t *p_sys = pl_priv(p_playlist);
- if( p_sys->p_preparser )
- playlist_preparser_Push( p_sys->p_preparser, p_item );
-
+ if( unlikely(p_sys->p_preparser == NULL) )
+ return VLC_ENOMEM;
+ playlist_preparser_Push( p_sys->p_preparser, p_item );
return VLC_SUCCESS;
}
@@ -213,9 +213,9 @@ int playlist_AskForArtEnqueue( playlist_t *p_playlist, input_item_t *p_item )
{
playlist_private_t *p_sys = pl_priv(p_playlist);
- if( p_sys->p_fetcher )
- playlist_fetcher_Push( p_sys->p_fetcher, p_item );
-
+ if( unlikely(p_sys->p_fetcher == NULL) )
+ return VLC_ENOMEM;
+ playlist_fetcher_Push( p_sys->p_fetcher, p_item );
return VLC_SUCCESS;
}
More information about the vlc-commits
mailing list