[vlc-devel] commit: libvlc_video_set_viewport: No need to check playlist status. ( Pierre d'Herbemont )
git version control
git at videolan.org
Fri Jun 13 15:19:48 CEST 2008
vlc | branch: master | Pierre d'Herbemont <pdherbemont at videolan.org> | Fri Jun 13 15:15:13 2008 +0200| [333b3ea49f5ebd606a409c39275d07559871d9cc]
libvlc_video_set_viewport: No need to check playlist status.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=333b3ea49f5ebd606a409c39275d07559871d9cc
---
src/control/video.c | 23 ++++++++++-------------
1 files changed, 10 insertions(+), 13 deletions(-)
diff --git a/src/control/video.c b/src/control/video.c
index 02c97ed..88aa643 100644
--- a/src/control/video.c
+++ b/src/control/video.c
@@ -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-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);
- if( p_mi )
+ vout_thread_t *p_vout = GetVout( p_mi, p_e );
+ if( p_vout )
{
- vout_thread_t *p_vout = GetVout( p_mi, p_e );
- if( p_vout )
- {
- /* change viewport for running vout */
- vout_Control( p_vout , VOUT_SET_VIEWPORT,
- 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);
+ /* change viewport for running vout */
+ vout_Control( p_vout , VOUT_SET_VIEWPORT,
+ 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);
}
}
More information about the vlc-devel
mailing list