Commit c261c25f authored by Jean-Paul Saman's avatar Jean-Paul Saman

Don't forget to release the video output object

parent d5b5c6cc
......@@ -325,29 +325,30 @@ char *libvlc_video_get_aspect_ratio( libvlc_input_t *p_input,
libvlc_exception_t *p_e )
{
char *psz_aspect = 0;
vout_thread_t *p_vout1 = GetVout( p_input, p_e );
vout_thread_t *p_vout = GetVout( p_input, p_e );
if( !p_vout1 )
if( !p_vout )
return 0;
psz_aspect = var_GetString( p_vout1, "aspect-ratio" );
vlc_object_release( p_vout1 );
psz_aspect = var_GetString( p_vout, "aspect-ratio" );
vlc_object_release( p_vout );
return psz_aspect;
}
void libvlc_video_set_aspect_ratio( libvlc_input_t *p_input,
char *psz_aspect, libvlc_exception_t *p_e )
{
vout_thread_t *p_vout1 = GetVout( p_input, p_e );
vout_thread_t *p_vout = GetVout( p_input, p_e );
int i_ret = -1;
if( !p_vout1 )
if( !p_vout )
return;
i_ret = var_SetString( p_vout1, "aspect-ratio", psz_aspect );
i_ret = var_SetString( p_vout, "aspect-ratio", psz_aspect );
if( i_ret )
libvlc_exception_raise( p_e,
"Unexpected error while setting aspect-ratio value" );
vlc_object_release( p_vout );
}
int libvlc_video_destroy( libvlc_input_t *p_input,
......
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