mxf: Don't use NULL GstStructures to prevent warnings
authorSebastian Dröge <sebastian.droege@collabora.co.uk>
Thu, 5 Mar 2009 13:40:57 +0000 (14:40 +0100)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Thu, 5 Mar 2009 13:40:57 +0000 (14:40 +0100)
Currently serializing of DM Frameworks is not supported
yet by DMS1 and will give us NULL.

gst/mxf/mxfmetadata.c

index 687165c..f13bcd0 100644 (file)
@@ -2924,9 +2924,11 @@ mxf_metadata_dm_segment_to_structure (MXFMetadataBase * m)
     GstStructure *s =
         mxf_metadata_base_to_structure (MXF_METADATA_BASE (self->dm_framework));
 
-    gst_structure_id_set (ret, MXF_QUARK (DM_FRAMEWORK), GST_TYPE_STRUCTURE, s,
-        NULL);
-    gst_structure_free (s);
+    if (s) {
+      gst_structure_id_set (ret, MXF_QUARK (DM_FRAMEWORK), GST_TYPE_STRUCTURE,
+          s, NULL);
+      gst_structure_free (s);
+    }
   }
 
   if (self->n_track_ids > 0) {