videorate: Fix max-duplication-time handling
authorSebastian Dröge <sebastian@centricular.com>
Mon, 28 Oct 2019 12:43:50 +0000 (14:43 +0200)
committerGStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Mon, 4 Nov 2019 19:01:10 +0000 (19:01 +0000)
commitc363747251c0071fe65b9413693f42d5875e02bd
tree1fedbb1c195195f563120531b6e95252cd77be50
parentdc274ea9ca1e34a6d8306dd8a045752f69ae49a1
videorate: Fix max-duplication-time handling

Previously this would've only set discont=TRUE and then for all future
buffers simply returned immediately.

Instead we also need to
  a) drain previous input until its buffer time
  b) update next_ts and base_ts accordingly for the gap
  c) actually store the new buffer after the gap so it can be used in
     the future and so the old buffer before the gap is gone

Also update the unit test accordingly so that it actually tests for this
behaviour. Previously it only tested that after the gap we got no output
at all.
gst/videorate/gstvideorate.c
tests/check/elements/videorate.c