[vlc-devel] [PATCH 12/17] video_output: compute the date_refresh earlier in ThreadDisplayRenderPicture
Steve Lhomme
robux4 at ycbcr.xyz
Mon Sep 14 16:03:23 CEST 2020
---
src/video_output/video_output.c | 33 +++++++++++++++++----------------
1 file changed, 17 insertions(+), 16 deletions(-)
diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index 758df6e017d..828edd4772b 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -1502,6 +1502,23 @@ static int ThreadDisplayPicture(vout_thread_sys_t *vout, vlc_tick_t *deadline)
bool drop_next_frame = frame_by_frame;
vlc_tick_t date_next = VLC_TICK_INVALID;
+ /* FIXME/XXX we must redisplay the last decoded picture (because
+ * of potential vout updated, or filters update or SPU update)
+ * For now a high update period is needed but it could be removed
+ * if and only if:
+ * - vout module emits events from theselves.
+ * - *and* SPU is modified to emit an event or a deadline when needed.
+ *
+ * So it will be done later.
+ */
+ bool refresh = false;
+
+ vlc_tick_t date_refresh = VLC_TICK_INVALID;
+ if (sys->displayed.date != VLC_TICK_INVALID) {
+ date_refresh = sys->displayed.date + VOUT_REDISPLAY_DELAY;
+ refresh = date_refresh <= system_now;
+ }
+
if (!paused && sys->displayed.next) {
const vlc_tick_t next_system_pts =
vlc_clock_ConvertToSystem(sys->clock, system_now,
@@ -1519,22 +1536,6 @@ static int ThreadDisplayPicture(vout_thread_sys_t *vout, vlc_tick_t *deadline)
}
}
- /* FIXME/XXX we must redisplay the last decoded picture (because
- * of potential vout updated, or filters update or SPU update)
- * For now a high update period is needed but it could be removed
- * if and only if:
- * - vout module emits events from theselves.
- * - *and* SPU is modified to emit an event or a deadline when needed.
- *
- * So it will be done later.
- */
- bool refresh = false;
-
- vlc_tick_t date_refresh = VLC_TICK_INVALID;
- if (sys->displayed.date != VLC_TICK_INVALID) {
- date_refresh = sys->displayed.date + VOUT_REDISPLAY_DELAY;
- refresh = date_refresh <= system_now;
- }
bool force_refresh = !drop_next_frame && refresh;
if (!frame_by_frame) {
--
2.26.2
More information about the vlc-devel
mailing list