diff --git a/include/vlc_input.h b/include/vlc_input.h index 7b052e9ebf..455241a41e 100644 --- a/include/vlc_input.h +++ b/include/vlc_input.h @@ -543,6 +543,8 @@ VLC_API int input_vaControl( input_thread_t *, int i_query, va_list ); VLC_API int input_Control( input_thread_t *, int i_query, ... ); +VLC_API int input_Close( input_thread_t * ); + /** * Get the input item for an input thread * diff --git a/src/input/input.c b/src/input/input.c index 63a148029d..cfbe3cc1a6 100644 --- a/src/input/input.c +++ b/src/input/input.c @@ -250,6 +250,17 @@ void input_Stop( input_thread_t *p_input, bool b_abort ) input_ControlPush( p_input, INPUT_CONTROL_SET_DIE, NULL ); } +/** + * Close an input + * + * It does not call input_Stop itself. + */ +int input_Close( input_thread_t *p_input ) +{ + vlc_thread_join( p_input ); + vlc_object_release( p_input ); +} + /** * Get the item from an input thread * FIXME it does not increase ref count of the item. diff --git a/src/libvlccore.sym b/src/libvlccore.sym index 896153737b..b53b0a0821 100644 --- a/src/libvlccore.sym +++ b/src/libvlccore.sym @@ -226,6 +226,7 @@ input_SplitMRL input_Start input_Stop input_vaControl +input_Close intf_Create intf_Eject IsUTF8