concat: fix locking in SEGMENT event handler
authorMathieu Duponchelle <mathieu@centricular.com>
Tue, 11 May 2021 17:02:28 +0000 (19:02 +0200)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Tue, 11 May 2021 19:13:08 +0000 (19:13 +0000)
commitd7272b324770a75a56ae71cdc407b09608a22d7e
treec9d8807c09aa1dbb890ef67fe57b5a7dd719b918
parent24f0370c2d9795d420ae0ba390686bf9fa3176a8
concat: fix locking in SEGMENT event handler

concat->current_start_offset needs the lock taken for safe access,
as it can be accessed from outside of the streaming thread, eg
in release_pad.

An early break is also added for an error case.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/818>
plugins/elements/gstconcat.c