webrtcstats: Fix null pointer dereference
authorPhilippe Normand <philn@igalia.com>
Wed, 29 Dec 2021 15:02:03 +0000 (15:02 +0000)
committerPhilippe Normand <philn@igalia.com>
Wed, 29 Dec 2021 15:55:57 +0000 (15:55 +0000)
commit43856a0735fb75afdc53d298ba5ee7b748b0e09b
tree4dbec13a37319842a1ccf7baa62da6842775b3e7
parent13f0128f7e877d9a04323beb55ce596a70953b76
webrtcstats: Fix null pointer dereference

If there is no jitterbuffer stats we should not attempt to store them in the
global stats structure.

Also add a g_return_if_fail in _gst_structure_take_structure() about this
because it is a programmer error to pass an invalid pointer address there.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1479>
subprojects/gst-plugins-bad/ext/webrtc/gstwebrtcstats.c