Commit e1314822 authored by Pierre d'Herbemont's avatar Pierre d'Herbemont

Libvlc: Use exception for internal function.

parent 77a27e5d
......@@ -99,10 +99,10 @@ VLC_EXPORT (input_thread_t *, libvlc_get_input_thread,
( struct libvlc_media_instance_t *, libvlc_exception_t * ) );
VLC_EXPORT (libvlc_media_instance_t *, libvlc_media_instance_new_from_input_thread,
( struct libvlc_instance_t *, input_thread_t * ) );
( struct libvlc_instance_t *, input_thread_t *, libvlc_exception_t * ) );
VLC_EXPORT (libvlc_media_descriptor_t *, libvlc_media_descriptor_new_from_input_item,
( struct libvlc_instance_t *, input_item_t * ) );
( struct libvlc_instance_t *, input_item_t *, libvlc_exception_t * ) );
VLC_EXPORT (libvlc_media_descriptor_t *, libvlc_media_descriptor_duplicate,
( libvlc_media_descriptor_t * ) );
......
......@@ -75,7 +75,8 @@ libvlc_media_descriptor_t * libvlc_media_descriptor_new(
**************************************************************************/
libvlc_media_descriptor_t * libvlc_media_descriptor_new_from_input_item(
libvlc_instance_t *p_instance,
input_item_t *p_input_item )
input_item_t *p_input_item,
libvlc_exception_t *p_e )
{
libvlc_media_descriptor_t * p_media_desc;
......
......@@ -72,14 +72,22 @@ libvlc_media_instance_new( libvlc_media_descriptor_t *p_md )
**************************************************************************/
libvlc_media_instance_t * libvlc_media_instance_new_from_input_thread(
struct libvlc_instance_t *p_libvlc_instance,
input_thread_t *p_input )
input_thread_t *p_input,
libvlc_exception_t *p_e )
{
libvlc_media_instance_t * p_mi;
p_mi = malloc( sizeof(libvlc_media_instance_t) );
p_mi->p_md = libvlc_media_descriptor_new_from_input_item(
p_libvlc_instance,
p_input->p->input.p_item );
p_input->p->input.p_item, p_e );
if( libvlc_exception_raised( p_e ) )
{
free( p_mi );
return NULL;
}
p_mi->p_libvlc_instance = p_libvlc_instance;
p_mi->i_input_id = p_input->i_object_id;
......
......@@ -220,7 +220,7 @@ libvlc_media_instance_t * libvlc_playlist_get_media_instance(
vlc_mutex_lock( &PL->object_lock );
p_mi = libvlc_media_instance_new_from_input_thread(
p_instance, PL->p_input );
p_instance, PL->p_input, p_e );
vlc_mutex_unlock( &PL->object_lock );
return p_mi;
......
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