preset: Do not save deprecated properties
authorThibault Saunier <thibault.saunier@osg.samsung.com>
Fri, 3 Nov 2017 15:20:47 +0000 (12:20 -0300)
committerThibault Saunier <tsaunier@gnome.org>
Sun, 26 Nov 2017 16:28:10 +0000 (13:28 -0300)
It will g_warn upon deserialization and we should not use
those anyway.

https://bugzilla.gnome.org/show_bug.cgi?id=789871

gst/gstpreset.c

index 22509f6..90b5836 100644 (file)
@@ -862,6 +862,12 @@ gst_preset_default_save_preset (GstPreset * preset, const gchar * name)
       continue;
     }
 
+    if (property->flags & G_PARAM_DEPRECATED) {
+      GST_INFO_OBJECT (preset, "Not saving property %s as it is deprecated",
+          property->name);
+      continue;
+    }
+
     g_value_init (&gvalue, property->value_type);
     if (is_child_proxy) {
       gst_child_proxy_get_property ((GstChildProxy *) preset, props[i],