[vlc-commits] vout: assert that the display is started
Thomas Guillem
git at videolan.org
Wed Oct 9 14:16:58 CEST 2019
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Wed Oct 9 14:07:54 2019 +0200| [4ef49cb7e6c3565da429c55508dc45c54444cc5d] | committer: Thomas Guillem
vout: assert that the display is started
If there is no display, there is no thread and vout_control_Hold() will wait
indefinitely.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4ef49cb7e6c3565da429c55508dc45c54444cc5d
---
src/video_output/video_output.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index 21d55bc89c..a504691386 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -1324,6 +1324,7 @@ static int ThreadDisplayPicture(vout_thread_t *vout, vlc_tick_t *deadline)
void vout_ChangePause(vout_thread_t *vout, bool is_paused, vlc_tick_t date)
{
assert(!vout->p->dummy);
+ assert(vout->p->display);
vout_control_Hold(&vout->p->control);
assert(!vout->p->pause.is_on || !is_paused);
@@ -1381,6 +1382,7 @@ void vout_Flush(vout_thread_t *vout, vlc_tick_t date)
{
vout_thread_sys_t *sys = vout->p;
assert(!sys->dummy);
+ assert(sys->display);
vout_control_Hold(&sys->control);
vout_FlushUnlocked(vout, false, date);
@@ -1390,6 +1392,7 @@ void vout_Flush(vout_thread_t *vout, vlc_tick_t date)
void vout_NextPicture(vout_thread_t *vout, vlc_tick_t *duration)
{
assert(!vout->p->dummy);
+ assert(vout->p->display);
*duration = 0;
vout_control_Hold(&vout->p->control);
@@ -1413,6 +1416,7 @@ void vout_ChangeDelay(vout_thread_t *vout, vlc_tick_t delay)
{
vout_thread_sys_t *sys = vout->p;
assert(!sys->dummy);
+ assert(sys->display);
vout_control_Hold(&sys->control);
vlc_clock_SetDelay(vout->p->clock, delay);
@@ -1424,6 +1428,7 @@ void vout_ChangeRate(vout_thread_t *vout, float rate)
{
vout_thread_sys_t *sys = vout->p;
assert(!sys->dummy);
+ assert(sys->display);
vout_control_Hold(&sys->control);
sys->rate = rate;
@@ -1610,6 +1615,7 @@ void vout_Cancel(vout_thread_t *vout, bool canceled)
{
vout_thread_sys_t *sys = vout->p;
assert(!sys->dummy);
+ assert(sys->display);
vout_control_Hold(&sys->control);
if (sys->decoder_pool != NULL)
More information about the vlc-commits
mailing list