[vlc-commits] vout: vout_Flush: check display
Thomas Guillem
git at videolan.org
Mon Jul 6 08:47:58 CEST 2020
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Tue Jun 30 16:41:04 2020 +0200| [be5511397c6a2d7b9d5d5d174b8da043eedf32ba] | committer: Thomas Guillem
vout: vout_Flush: check display
That way, the caller doesn't have to know if the vout is started to safely
call vout_Flush().
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=be5511397c6a2d7b9d5d5d174b8da043eedf32ba
---
src/video_output/video_output.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index 480dfe75f3..793435887f 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -1405,20 +1405,22 @@ static void vout_FlushUnlocked(vout_thread_t *vout, bool below,
picture_fifo_Flush(sys->decoder_fifo, date, below);
- assert(sys->display != NULL);
vlc_mutex_lock(&sys->display_lock);
- vout_FilterFlush(sys->display);
+ if (sys->display != NULL)
+ vout_FilterFlush(sys->display);
vlc_mutex_unlock(&sys->display_lock);
- vlc_clock_Reset(sys->clock);
- vlc_clock_SetDelay(sys->clock, sys->delay);
+ if (sys->clock != NULL)
+ {
+ vlc_clock_Reset(sys->clock);
+ vlc_clock_SetDelay(sys->clock, sys->delay);
+ }
}
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);
More information about the vlc-commits
mailing list