videorate: Fix max-duplication-time handling
authorSebastian Dröge <sebastian@centricular.com>
Mon, 28 Oct 2019 12:43:50 +0000 (14:43 +0200)
committerTim-Philipp Müller <tim@centricular.com>
Tue, 5 Nov 2019 18:12:32 +0000 (18:12 +0000)
commite9f752f5ceed4893edd69cbbaca73e322772acc5
tree39026accc76eda739a0f698412bf4893d76ac445
parentdceaa4dd4baca2b9ebd92017269060e5345408f9
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