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>
{
GValue v = G_VALUE_INIT;
+ g_return_if_fail (GST_IS_STRUCTURE (*value_s));
+
g_value_init (&v, GST_TYPE_STRUCTURE);
g_value_take_boxed (&v, *value_s);
/* Store the raw stats from GStreamer into the structure for advanced
* information.
*/
- _gst_structure_take_structure (in, "gst-rtpjitterbuffer-stats", &jb_stats);
+ if (jb_stats)
+ _gst_structure_take_structure (in, "gst-rtpjitterbuffer-stats",
+ &jb_stats);
gst_structure_set (in, "gst-rtpsource-stats", GST_TYPE_STRUCTURE,
source_stats, NULL);