[vlc-devel] [PATCH 12/13] qt: PlayerController: simplify getVout()
Thomas Guillem
thomas at gllm.fr
Mon Apr 15 15:50:57 CEST 2019
---
modules/gui/qt/components/player_controller.cpp | 12 +++---------
1 file changed, 3 insertions(+), 9 deletions(-)
diff --git a/modules/gui/qt/components/player_controller.cpp b/modules/gui/qt/components/player_controller.cpp
index 6899e3bca1..1c798049da 100644
--- a/modules/gui/qt/components/player_controller.cpp
+++ b/modules/gui/qt/components/player_controller.cpp
@@ -1170,16 +1170,10 @@ PlayerController::VoutPtr PlayerController::getVout()
{
Q_D(PlayerController);
vlc_player_locker lock{ d->m_player };
- size_t count = 0;
- vout_thread_t** vouts = vlc_player_vout_HoldAll( d->m_player, &count );
- if( count == 0 || vouts == NULL )
+ vout_thread_t* vout = vlc_player_vout_Hold( d->m_player );
+ if( vout == NULL )
return VoutPtr{};
- //add a reference
- VoutPtr first_vout{vouts[0], true};
- for( size_t i = 0; i < count; i++ )
- vout_Release(vouts[i]);
- free( vouts );
- return first_vout;
+ return VoutPtr{vout, false};
}
void PlayerController::setFullscreen( bool new_val )
--
2.20.1
More information about the vlc-devel
mailing list