basesink: Only drop buffer if their PTS is out of segment
authorNicolas Dufresne <nicolas.dufresne@collabora.com>
Wed, 5 Aug 2015 19:51:27 +0000 (15:51 -0400)
committerNicolas Dufresne <nicolas.dufresne@collabora.com>
Wed, 5 Aug 2015 19:51:27 +0000 (15:51 -0400)
commite24e902d2faea6cfa59ea5152ad65939c6f97f62
tree67c5bdf05b6f181001f91b049694761a504ff98c
parent60de1f26c78feb0cde6d3f82cf86cf35daa71cc0
basesink: Only drop buffer if their PTS is out of segment

As of now, even for stream completly inside segment, there is no
guarantied that the DTS will be inside the segment. Specifically
for H.264 with B-Frames, the first few frames often have DTS that
are before the segment.

Instead of using the sync timestamp to clip out of segment buffer,
take the duration from the start/stop provided by the sub-class, and
check if the pts and pts_end is out of segment.

https://bugzilla.gnome.org/show_bug.cgi?id=752791
libs/gst/base/gstbasesink.c