Commit 333b3ea4 authored by Pierre d'Herbemont's avatar Pierre d'Herbemont

libvlc_video_set_viewport: No need to check playlist status.

parent e315c9b4
...@@ -312,22 +312,19 @@ void libvlc_video_set_viewport( libvlc_instance_t *p_instance, ...@@ -312,22 +312,19 @@ void libvlc_video_set_viewport( libvlc_instance_t *p_instance,
var_SetInteger( p_instance->p_libvlc_int, "drawable-clip-bottom", clip->bottom ); var_SetInteger( p_instance->p_libvlc_int, "drawable-clip-bottom", clip->bottom );
var_SetInteger( p_instance->p_libvlc_int, "drawable-clip-right", clip->right ); var_SetInteger( p_instance->p_libvlc_int, "drawable-clip-right", clip->right );
if( libvlc_playlist_isplaying(p_instance, p_e) ) libvlc_media_player_t *p_mi = libvlc_playlist_get_media_player(p_instance, p_e);
if( p_mi )
{ {
libvlc_media_player_t *p_mi = libvlc_playlist_get_media_player(p_instance, p_e); vout_thread_t *p_vout = GetVout( p_mi, p_e );
if( p_mi ) if( p_vout )
{ {
vout_thread_t *p_vout = GetVout( p_mi, p_e ); /* change viewport for running vout */
if( p_vout ) vout_Control( p_vout , VOUT_SET_VIEWPORT,
{ view->top, view->left, view->bottom, view->right,
/* change viewport for running vout */ clip->top, clip->left, clip->bottom, clip->right );
vout_Control( p_vout , VOUT_SET_VIEWPORT, vlc_object_release( p_vout );
view->top, view->left, view->bottom, view->right,
clip->top, clip->left, clip->bottom, clip->right );
vlc_object_release( p_vout );
}
libvlc_media_player_release(p_mi);
} }
libvlc_media_player_release(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