Commit 3e2015d8 authored by Pierre d'Herbemont's avatar Pierre d'Herbemont

libvlc_video_get_height: Don't use a potentially freed pointer.

Pointed-out-by: Lukas
parent 4b83963f
......@@ -139,13 +139,16 @@ libvlc_video_take_snapshot( libvlc_media_player_t *p_mi, char *psz_filepath,
int libvlc_video_get_height( libvlc_media_player_t *p_mi,
libvlc_exception_t *p_e )
{
int height;
vout_thread_t *p_vout = GetVout( p_mi, p_e );
if( !p_vout )
return 0;
if( !p_vout ) return 0;
height = p_vout->i_window_height;
vlc_object_release( p_vout );
return p_vout->i_window_height;
return height;
}
int libvlc_video_get_width( libvlc_media_player_t *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