Commit 2b7b3b77 authored by Rémi Duraffort's avatar Rémi Duraffort

libvlc_media_player: fix object leak (input thread).

parent 74dc7c83
...@@ -1092,6 +1092,7 @@ float libvlc_media_player_get_rate( ...@@ -1092,6 +1092,7 @@ float libvlc_media_player_get_rate(
b_can_rewind = var_GetBool( p_input_thread, "can-rewind" ); b_can_rewind = var_GetBool( p_input_thread, "can-rewind" );
if( (val.i_int < 0) && !b_can_rewind ) if( (val.i_int < 0) && !b_can_rewind )
{ {
vlc_object_release( p_input_thread );
libvlc_exception_raise( p_e, "invalid rate" ); libvlc_exception_raise( p_e, "invalid rate" );
return 0.0; return 0.0;
} }
...@@ -1241,11 +1242,14 @@ int libvlc_media_player_can_pause( libvlc_media_player_t *p_mi, ...@@ -1241,11 +1242,14 @@ int libvlc_media_player_can_pause( libvlc_media_player_t *p_mi,
return val.b_bool; return val.b_bool;
} }
void libvlc_media_player_next_frame( libvlc_media_player_t *p_mi, libvlc_exception_t *p_e ) void libvlc_media_player_next_frame( libvlc_media_player_t *p_mi, libvlc_exception_t *p_e )
{ {
input_thread_t *p_input_thread = libvlc_get_input_thread ( p_mi, p_e ); input_thread_t *p_input_thread = libvlc_get_input_thread ( p_mi, p_e );
if( p_input_thread != NULL ) if( p_input_thread != NULL )
{
var_TriggerCallback( p_input_thread, "frame-next" ); var_TriggerCallback( p_input_thread, "frame-next" );
vlc_object_release( p_input_thread );
}
else else
libvlc_exception_raise( p_e, "Input thread is NULL" ); libvlc_exception_raise( p_e, "Input thread is NULL" );
} }
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