+2005-10-17 Thomas Vander Stichele <thomas at apestaart dot org>
+
+ * gst/gstcaps.c: (gst_caps_intersect):
+ fix signedness issues in a (hopefully) correct way
+ * gst/gstelement.c: (gst_element_pads_activate):
+ some debugging
+ * gst/gstobject.c: (gst_object_set_parent):
+ some debugging
+
2005-10-17 Julien MOUTTE <julien@moutte.net>
* gst/gstvalue.h: Fix prototypes.
GstCaps *
gst_caps_intersect (const GstCaps * caps1, const GstCaps * caps2)
{
- gint64 i, j, k; /* indexes can be up to 2 * sizeof (guint) */
+ guint64 i; /* index can be up to 2 * G_MAX_UINT */
+ guint j, k;
GstStructure *struct1;
GstStructure *struct2;
/* now run the diagonal line, end condition is the left or bottom
* border */
- while (k < caps2->structs->len && j >= 0) {
+ while (k < caps2->structs->len) {
struct1 = gst_caps_get_structure (caps1, j);
struct2 = gst_caps_get_structure (caps2, k);
gst_caps_append_structure (dest, istruct);
/* move down left */
k++;
+ if (j == 0)
+ break; /* so we don't roll back to G_MAXUINT */
j--;
}
}
GstIterator *iter;
gboolean fold_ok;
+ GST_DEBUG_OBJECT (element, "pads_activate with active %d", active);
/* no need to unset this later, it's just a boolean */
g_value_init (&ret, G_TYPE_BOOLEAN);
g_value_set_boolean (&ret, TRUE);
fold_ok = iterator_fold_with_resync
(iter, (GstIteratorFoldFunction) activate_pads, &ret, &active);
gst_iterator_free (iter);
- if (!fold_ok || !g_value_get_boolean (&ret))
+ if (!fold_ok || !g_value_get_boolean (&ret)) {
+ GST_DEBUG_OBJECT (element, "pads_activate failed");
return FALSE;
+ }
iter = gst_element_iterate_sink_pads (element);
fold_ok = iterator_fold_with_resync
(iter, (GstIteratorFoldFunction) activate_pads, &ret, &active);
gst_iterator_free (iter);
- if (!fold_ok || !g_value_get_boolean (&ret))
+ if (!fold_ok || !g_value_get_boolean (&ret)) {
+ GST_DEBUG_OBJECT (element, "pads_activate failed");
return FALSE;
+ }
+ GST_DEBUG_OBJECT (element, "pads_activate successful");
return TRUE;
}
* in the floating case. */
object->parent = parent;
if (G_LIKELY (GST_OBJECT_IS_FLOATING (object))) {
+ GST_CAT_LOG_OBJECT (GST_CAT_REFCOUNTING, object, "unsetting floating flag");
GST_OBJECT_FLAG_UNSET (object, GST_OBJECT_FLOATING);
GST_UNLOCK (object);
} else {