Commit 4e2eb93f authored by Sebastian Dröge's avatar Sebastian Dröge 🍵
Browse files

capsfilter: When switching caps change modes, forget all previous caps

parent 5e5a1402
......@@ -213,9 +213,21 @@ gst_capsfilter_set_property (GObject * object, guint prop_id,
gst_base_transform_reconfigure_sink (GST_BASE_TRANSFORM (object));
break;
}
case PROP_CAPS_CHANGE_MODE:
case PROP_CAPS_CHANGE_MODE:{
GstCapsFilterCapsChangeMode old_change_mode;
GST_OBJECT_LOCK (capsfilter);
old_change_mode = capsfilter->caps_change_mode;
capsfilter->caps_change_mode = g_value_get_enum (value);
if (capsfilter->caps_change_mode != old_change_mode) {
g_list_free_full (capsfilter->previous_caps,
(GDestroyNotify) gst_caps_unref);
capsfilter->previous_caps = NULL;
}
GST_OBJECT_UNLOCK (capsfilter);
break;
}
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment