videoaggregator: fix buffer skipping with pad offsets
authorMathieu Duponchelle <mathieu@centricular.com>
Thu, 7 Mar 2019 17:55:33 +0000 (18:55 +0100)
committerSebastian Dröge <slomo@coaxion.net>
Fri, 8 Mar 2019 07:40:25 +0000 (07:40 +0000)
commita35d500eaeef06b2eb438f17c9f20702ef280b11
tree5a8cbec2f9c0fdf766a6bd0c850a9ac764ba6f6d
parent6a37bf9bb91e329464a5c5349d2dd5e88bd95b54
videoaggregator: fix buffer skipping with pad offsets

The ->skip_buffer implementation in videoaggregator replicates
the behaviour of the aggregate method to determine whether a
buffer can be skipped
(https://bugzilla.gnome.org/show_bug.cgi?id=781928).

This fixes a typo that made it so the start time of the buffer
was calculated against the output segment, not the segment of
the relevant sinkpad, which caused buffers to be skipped when
for example a sinkpad had received a segment which base had
been modified by a pad offset somewhere along the way.

This simply makes the calculation of the buffer start time
identical to the calculation in aggregate()
gst-libs/gst/video/gstvideoaggregator.c