mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
capsfilter: When switching caps change modes, forget all previous caps
This commit is contained in:
parent
5e5a14028a
commit
4e2eb93f04
1 changed files with 13 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue