GNOME Bugzilla – Bug 776336
NULL GstStructures cannot be deserialized
Last modified: 2018-11-03 12:38:40 UTC
When serializing a nested structure where a substructure is NULL, it will be serializes as: sub=(structure)"\(NULL\)" This cannot be serialized. Do we want to add support for (NULL) in the structure parser?
Small correction, we cannot *deserialize* them right now. From a quick sync on IRC we concluded that we should try to support this case in the deserialization. I'll post a patch when I have this fixed.
I wonder if we should serialise this as "(NULL)" in the first place. But in general I think we want to be able to serialise/deserialise NULL boxed types, yes.
What would be the alternative. I think serializing the type name is a good idea still. We could serialize as sub=(structure)0 or sub=(structure)NULL, but in any case we need to special case this.
From the tracer we're actually getting this, because we're logging with GST_PTR_FORMAT. When using gst_structure_to_string() having NULL ptr as structure fields does not work actually :/ Here is some background for it: https://cgit.freedesktop.org/gstreamer/gstreamer/tree/plugins/tracers/gststats.c#n460 The tracer builds a structure compatible sprintf format for performance reasons. Maybe I need to sprintf each field and skip those that are NULL.
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gstreamer/issues/211.