[vlc-commits] vout: also update forced clock points
Thomas Guillem
git at videolan.org
Mon Sep 23 13:36:15 CEST 2019
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Fri Sep 6 09:10:28 2019 +0200| [013aa3aa9820dcf9cdd74b1505d7fa60dda04226] | committer: Thomas Guillem
vout: also update forced clock points
The system_date is invalid, this won't have any effect on the clock but this
will forward the notification to the player.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=013aa3aa9820dcf9cdd74b1505d7fa60dda04226
---
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 17663f7cdb..eb022fb2ac 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -1192,9 +1192,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
@@ -1210,10 +1210,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);
More information about the vlc-commits
mailing list