[vlc-devel] [PATCH V3 10/19] vout: also update forced clock points
Thomas Guillem
thomas at gllm.fr
Fri Sep 6 17:20:40 CEST 2019
The system_date is invalid, this won't have any effect on the clock but this
will forward the notification to the player.
---
src/video_output/video_output.c | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index e5ecae9762..862b3ce23a 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -1203,9 +1203,9 @@ static int ThreadDisplayRenderPicture(vout_thread_t *vout, bool is_forced)
}
#endif
+ system_now = vlc_tick_now();
if (!is_forced)
{
- system_now = vlc_tick_now();
if (unlikely(system_now > system_pts))
{
/* vd->prepare took too much time. Tell the clock that the pts was
@@ -1221,10 +1221,16 @@ static int ThreadDisplayRenderPicture(vout_thread_t *vout, bool is_forced)
/* Don't touch system_pts. Tell the clock that the pts was rendered
* at the expected date */
}
- vlc_clock_UpdateVideo(sys->clock, system_pts, pts, sys->rate,
- frame_rate, frame_rate_base);
+ sys->displayed.date = system_pts;
+ }
+ else
+ {
+ sys->displayed.date = system_now;
+ /* Tell the clock that the pts was forced */
+ system_pts = INT64_MAX;
}
- sys->displayed.date = system_pts;
+ vlc_clock_UpdateVideo(sys->clock, system_pts, pts, sys->rate,
+ frame_rate, frame_rate_base);
/* Display the direct buffer returned by vout_RenderPicture */
vout_display_Display(vd, todisplay);
--
2.20.1
More information about the vlc-devel
mailing list