]> git.sesse.net Git - vlc/blobdiff - include/vlc_input.h
Removes trailing spaces. Removes tabs.
[vlc] / include / vlc_input.h
index 508f063ae01ebfa62024559c6d4ce477395612ab..e185d4c40bd4f143bdc81cf0029a754303f35ff5 100644 (file)
@@ -89,16 +89,15 @@ struct input_item_t
 };
 
 #define ITEM_TYPE_UNKNOWN       0
-#define ITEM_TYPE_AFILE         1
-#define ITEM_TYPE_VFILE         2
-#define ITEM_TYPE_DIRECTORY     3
-#define ITEM_TYPE_DISC          4
-#define ITEM_TYPE_CDDA          5
-#define ITEM_TYPE_CARD          6
-#define ITEM_TYPE_NET           7
-#define ITEM_TYPE_PLAYLIST      8
-#define ITEM_TYPE_NODE          9
-#define ITEM_TYPE_NUMBER        10
+#define ITEM_TYPE_FILE          1
+#define ITEM_TYPE_DIRECTORY     2
+#define ITEM_TYPE_DISC          3
+#define ITEM_TYPE_CDDA          4
+#define ITEM_TYPE_CARD          5
+#define ITEM_TYPE_NET           6
+#define ITEM_TYPE_PLAYLIST      7
+#define ITEM_TYPE_NODE          8
+#define ITEM_TYPE_NUMBER        9
 
 static inline void input_ItemInit( vlc_object_t *p_o, input_item_t *p_i )
 {
@@ -228,7 +227,7 @@ static inline void input_item_SetMeta( input_item_t *p_i, vlc_meta_type_t meta_t
     if( !p_i->p_meta )
         p_i->p_meta = vlc_meta_New();
     vlc_meta_Set( p_i->p_meta, meta_type, psz_val );
-    vlc_mutex_unlock( &p_i->lock ); 
+    vlc_mutex_unlock( &p_i->lock );
 
     /* Notify interested third parties */
     event.type = vlc_InputItemMetaChanged;
@@ -239,6 +238,11 @@ static inline void input_item_SetMeta( input_item_t *p_i, vlc_meta_type_t meta_t
 static inline vlc_bool_t input_item_MetaMatch( input_item_t *p_i, vlc_meta_type_t meta_type, const char *psz )
 {
     vlc_mutex_lock( &p_i->lock );
+    if( !p_i->p_meta )
+    {
+        vlc_mutex_unlock( &p_i->lock );
+        return VLC_FALSE;
+    }
     const char * meta = vlc_meta_Get( p_i->p_meta, meta_type );
     vlc_bool_t ret = meta && strcasestr( meta, psz );
     vlc_mutex_unlock( &p_i->lock );