videorate: Fix buffer timestamp underflow in reverse playback
authorThibault Saunier <tsaunier@igalia.com>
Mon, 27 Apr 2020 13:57:30 +0000 (09:57 -0400)
committerGStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Wed, 6 May 2020 16:50:01 +0000 (16:50 +0000)
commitfc2810badaa0f3e8dcd1ede91bde4a21be28c531
tree26f8c5b304a668055fcc4135f5efda15c1fcb59a
parent9ce93abb29130d54daa441be92aad2d1562ef28b
videorate: Fix buffer timestamp underflow in reverse playback

And fix reverse playback buffer duration computation as in reverse
playback, buffer duration is prev_buffer.pts - buffer.pts not pts -
next_pts (buffers are displayed from buffer.pts + buffer.duration for
a duration of buffers.duration).

This is now tested with the `validate.test.clock_sync.videorate.*`
tests in the default integration testsuite where we check the exact
data flow and the synchronization on the clock behaviour with a
TestClock.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/646>
gst/videorate/gstvideorate.c