[vlc-commits] art fetcher: input_item_GetInfo returns empty string.
Francois Cartegnie
git at videolan.org
Mon Jun 4 13:23:09 CEST 2012
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon Jun 4 13:21:06 2012 +0200| [98633cd109bff58fdb5c36c2c153a101cf48f9b0] | committer: Francois Cartegnie
art fetcher: input_item_GetInfo returns empty string.
Wrong test used in 8fa822f747921b509857cd3701fbf1942e86d52b.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=98633cd109bff58fdb5c36c2c153a101cf48f9b0
---
src/playlist/art.c | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/src/playlist/art.c b/src/playlist/art.c
index d88d98b..79ca30f 100644
--- a/src/playlist/art.c
+++ b/src/playlist/art.c
@@ -232,7 +232,12 @@ static char * GetFileByItemUID( char *psz_dir, const char *psz_type )
int playlist_FindArtInCacheUsingItemUID( input_item_t *p_item )
{
char *uid = input_item_GetInfo( p_item, "uid", "md5" );
- if ( !uid ) return VLC_EGENERIC;
+ if ( ! *uid )
+ {
+ free( uid );
+ return VLC_EGENERIC;
+ }
+
/* we have an input item uid set */
bool b_done = false;
char *psz_byuiddir = GetDirByItemUIDs( uid );
@@ -305,7 +310,11 @@ int playlist_SaveArt( playlist_t *p_playlist, input_item_t *p_item,
/* save uid info */
char *uid = input_item_GetInfo( p_item, "uid", "md5" );
- if ( !uid ) goto end;
+ if ( ! *uid )
+ {
+ free( uid );
+ goto end;
+ }
char *psz_byuiddir = GetDirByItemUIDs( uid );
char *psz_byuidfile = GetFileByItemUID( psz_byuiddir, "arturl" );
More information about the vlc-commits
mailing list