X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=include%2Fvlc_input.h;h=060effc410a4ed1ac551e9fff8b938ed33c1d0f7;hb=1359fbd1013bb48528d54f8674d3feb2acfbdd45;hp=2d30b9e30d75f9256cf03defa0b028b857ac94e7;hpb=16e518077e1c20ec40052157d9685b8468f2f0a7;p=vlc diff --git a/include/vlc_input.h b/include/vlc_input.h index 2d30b9e30d..060effc410 100644 --- a/include/vlc_input.h +++ b/include/vlc_input.h @@ -227,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; @@ -238,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 ); @@ -417,7 +422,7 @@ static inline void input_item_MetaMerge( input_item_t *p_i, const vlc_meta_t * p #define input_item_GetSetting( item ) input_item_GetMeta( item, vlc_meta_Setting ) VLC_EXPORT( char *, input_ItemGetInfo, ( input_item_t *p_i, const char *psz_cat,const char *psz_name ) ); -VLC_EXPORT(int, input_ItemAddInfo, ( input_item_t *p_i, const char *psz_cat, const char *psz_name, const char *psz_format, ... ) ); +VLC_EXPORT(int, input_ItemAddInfo, ( input_item_t *p_i, const char *psz_cat, const char *psz_name, const char *psz_format, ... ) ATTRIBUTE_FORMAT( 4, 5 ) ); #define input_ItemNew( a,b,c ) input_ItemNewExt( a, b, c, 0, NULL, -1 ) #define input_ItemNewExt(a,b,c,d,e,f) __input_ItemNewExt( VLC_OBJECT(a),b,c,d,e,f) @@ -736,6 +741,7 @@ enum input_query_e /* Input properties */ INPUT_GET_BYTE_POSITION, /* arg1= int64_t * res= */ INPUT_SET_BYTE_SIZE, /* arg1= int64_t * res= */ + INPUT_GET_VIDEO_FPS, /* arg1= double * res=can fail */ /* bookmarks */ INPUT_GET_BOOKMARKS, /* arg1= seekpoint_t *** arg2= int * res=can fail */