From: Derk-Jan Hartman Date: Thu, 23 Nov 2006 16:06:13 +0000 (+0000) Subject: * destroy some mutex'es once in a while to prevent memleaks. Suggested by a forumuser... X-Git-Tag: 0.9.0-test0~9259 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=6f1095eb49a731f39aa89856815ba06745af6210;p=vlc * destroy some mutex'es once in a while to prevent memleaks. Suggested by a forumuser, name pending. --- diff --git a/modules/control/hotkeys.c b/modules/control/hotkeys.c index e066a69d23..14250c7e8e 100644 --- a/modules/control/hotkeys.c +++ b/modules/control/hotkeys.c @@ -135,6 +135,7 @@ static void Close( vlc_object_t *p_this ) { vlc_object_release( p_intf->p_sys->p_vout ); } + vlc_mutex_destroy( &p_intf->p_sys->change_lock ); /* Destroy structure */ free( p_intf->p_sys ); } diff --git a/src/input/input.c b/src/input/input.c index 084ce04343..c1b7fda86f 100644 --- a/src/input/input.c +++ b/src/input/input.c @@ -859,7 +859,7 @@ static int Init( input_thread_t * p_input ) if( p_input->i_start > 0 ) { - if( p_input->i_start >= val.i_time ) + if( p_input->i_start >= p_input->input.p_item->i_duration ) { msg_Warn( p_input, "invalid start-time ignored" ); } @@ -1184,6 +1184,7 @@ static void End( input_thread_t * p_input ) CL_CO( decoded_audio) ; CL_CO( decoded_video ); CL_CO( decoded_sub) ; + vlc_mutex_destroy( &p_input->counters.counters_lock ); } /* Close optional stream output instance */ diff --git a/src/libvlc-common.c b/src/libvlc-common.c index c70e0068de..8d51f312e4 100644 --- a/src/libvlc-common.c +++ b/src/libvlc-common.c @@ -1109,6 +1109,7 @@ int libvlc_InternalDestroy( libvlc_int_t *p_libvlc, vlc_bool_t b_release ) /* Destroy mutexes */ vlc_mutex_destroy( &p_libvlc->config_lock ); + vlc_mutex_destroy( &p_libvlc->timer_lock ); if( b_release ) vlc_object_release( p_libvlc ); vlc_object_destroy( p_libvlc );