gst_base_transform_set_gap_aware (trans, TRUE);
gst_base_transform_set_prefer_passthrough (trans, FALSE);
filter->filter_caps = gst_caps_new_any ();
+ filter->filter_caps_used = FALSE;
filter->caps_change_mode = DEFAULT_CAPS_CHANGE_MODE;
}
GST_OBJECT_LOCK (capsfilter);
old_caps = capsfilter->filter_caps;
capsfilter->filter_caps = new_caps;
- if (old_caps
- && capsfilter->caps_change_mode ==
+ if (old_caps && capsfilter->filter_caps_used &&
+ capsfilter->caps_change_mode ==
GST_CAPS_FILTER_CAPS_CHANGE_MODE_DELAYED) {
capsfilter->previous_caps =
g_list_prepend (capsfilter->previous_caps, gst_caps_ref (old_caps));
(GDestroyNotify) gst_caps_unref);
capsfilter->previous_caps = NULL;
}
+ capsfilter->filter_caps_used = FALSE;
GST_OBJECT_UNLOCK (capsfilter);
gst_caps_unref (old_caps);
GST_OBJECT_LOCK (capsfilter);
filter_caps = gst_caps_ref (capsfilter->filter_caps);
+ capsfilter->filter_caps_used = TRUE;
caps_change_mode = capsfilter->caps_change_mode;
GST_OBJECT_UNLOCK (capsfilter);
GST_OBJECT_LOCK (capsfilter);
filter_caps = gst_caps_ref (capsfilter->filter_caps);
+ capsfilter->filter_caps_used = TRUE;
GST_OBJECT_UNLOCK (capsfilter);
ret = gst_caps_can_intersect (caps, filter_caps);
if (!l && gst_caps_can_intersect (caps, filter->filter_caps)) {
g_list_free_full (filter->previous_caps, (GDestroyNotify) gst_caps_unref);
filter->previous_caps = NULL;
+ filter->filter_caps_used = TRUE;
}
GST_OBJECT_UNLOCK (filter);
}