latency tracer: Fix unsafe and NULL pointer accesses
authorJan Schmidt <jan@centricular.com>
Fri, 30 Aug 2019 13:59:42 +0000 (23:59 +1000)
committerNicolas Dufresne <nicolas.dufresne@collabora.com>
Wed, 15 Jul 2020 20:28:32 +0000 (16:28 -0400)
commite07bb52bf7fc5c356ffd43c5bb17ce75e8b66d7f
tree88d3181eba5308c0b90e1eaa634dc4b7f7629592
parentcecb2912633164a66a942d5413404812ad8fc0a0
latency tracer: Fix unsafe and NULL pointer accesses

Use thread-safe accesses to pad peers and parent objects. This
fixes some crashers and all the non-safe access patterns I could
spot. There's still some weirdness when using the latency
tracer on pipeline chains that aren't yet linked, but this
at least stops it segfaulting.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/269>
plugins/tracers/gstlatency.c