identity: Fix crash when receiving a gap event outside the current segment
authorVivia Nikolaidou <vivia@ahiru.eu>
Fri, 29 Oct 2021 10:27:37 +0000 (13:27 +0300)
committerVivia Nikolaidou <vivia@ahiru.eu>
Fri, 29 Oct 2021 11:08:49 +0000 (14:08 +0300)
commit6c21dd4de1a32be7096f62584f69445476569cbe
treee9e7f22b626e3c011be2998fefb1369eb694e1b0
parentc414f9560a0909733440d37d0d3c8cf317c7272a
identity: Fix crash when receiving a gap event outside the current segment

We were checking if the start time of the gap event was
GST_CLOCK_TIME_NONE, which is superfluous because that cannot happen,
and then not checking if it was NONE after gst_segment_to_running_time,
which caused a crash if an identity received a gap event fully or
partially outside the current segment.

This patch was done in cooperation with:
Jan Alexander Steffens (heftig) <jan.steffens@ltnglobal.com>

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1269>
subprojects/gstreamer/plugins/elements/gstidentity.c