Commit a5c2c7ea authored by Alexey Sokolov's avatar Alexey Sokolov Committed by Jean-Baptiste Kempf

Add few missing error messages to libvlc.

Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 1f442822
......@@ -156,7 +156,7 @@ LIBVLC_API libvlc_media_t *
*
* \param p_ml a media list instance
* \param p_md media instance
* \return position of media instance
* \return position of media instance or -1 if media not found
*/
LIBVLC_API int
libvlc_media_list_index_of_item( libvlc_media_list_t *p_ml,
......
......@@ -114,7 +114,20 @@ void libvlc_release( libvlc_instance_t *p_instance )
int libvlc_add_intf( libvlc_instance_t *p_i, const char *name )
{
return libvlc_InternalAddIntf( p_i->p_libvlc_int, name ) ? -1 : 0;
if( libvlc_InternalAddIntf( p_i->p_libvlc_int, name ))
{
if( name )
{
libvlc_printerr("interface \"%s\" initialization failed",
name );
}
else
{
libvlc_printerr("default interface initialization failed");
}
return -1;
}
return 0;
}
void libvlc_set_exit_handler( libvlc_instance_t *p_i, void (*cb) (void *),
......
......@@ -64,7 +64,10 @@ libvlc_media_library_new( libvlc_instance_t * p_inst )
p_mlib = malloc(sizeof(libvlc_media_library_t));
if( !p_mlib )
{
libvlc_printerr( "Not enough memory" );
return NULL;
}
p_mlib->p_libvlc_instance = p_inst;
p_mlib->i_refcount = 1;
......
......@@ -454,6 +454,7 @@ int libvlc_media_list_index_of_item( libvlc_media_list_t * p_mlist,
if( p_searched_md == p_md )
return i;
}
libvlc_printerr( "Media not found" );
return -1;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment