2008-05-13 Sebastian Dröge <slomo@circular-chaos.org>
* plugins/elements/gsttypefindelement.c:
+ (gst_type_find_element_handle_event),
+ (gst_type_find_element_send_cached_events),
+ (gst_type_find_element_change_state):
+ Clean up on FLUSH_STOP and not FLUSH_START. Forward both events
+ immediately.
+
+2008-05-13 Sebastian Dröge <slomo@circular-chaos.org>
+
+ * plugins/elements/gsttypefindelement.c:
(gst_type_find_handle_src_query), (stop_typefinding),
(gst_type_find_element_handle_event),
(gst_type_find_element_send_cached_events),
res = gst_pad_event_default (pad, event);
break;
}
- case GST_EVENT_FLUSH_START:
- GST_OBJECT_LOCK (typefind);
+ case GST_EVENT_FLUSH_STOP:
g_list_foreach (typefind->cached_events,
(GFunc) gst_mini_object_unref, NULL);
g_list_free (typefind->cached_events);
typefind->cached_events = NULL;
- GST_OBJECT_UNLOCK (typefind);
gst_buffer_replace (&typefind->store, NULL);
+ /* fall through */
+ case GST_EVENT_FLUSH_START:
res = gst_pad_event_default (pad, event);
break;
default:
GST_DEBUG_OBJECT (typefind, "Saving %s event to send later",
GST_EVENT_TYPE_NAME (event));
- GST_OBJECT_LOCK (typefind);
typefind->cached_events =
g_list_append (typefind->cached_events, event);
- GST_OBJECT_UNLOCK (typefind);
res = TRUE;
break;
}
{
GList *l;
- GST_OBJECT_LOCK (typefind);
for (l = typefind->cached_events; l != NULL; l = l->next) {
GstEvent *event = GST_EVENT (l->data);
}
g_list_free (typefind->cached_events);
typefind->cached_events = NULL;
- GST_OBJECT_UNLOCK (typefind);
}
static gboolean
case GST_STATE_CHANGE_READY_TO_NULL:
gst_caps_replace (&typefind->caps, NULL);
- GST_OBJECT_LOCK (typefind);
g_list_foreach (typefind->cached_events,
(GFunc) gst_mini_object_unref, NULL);
g_list_free (typefind->cached_events);
typefind->cached_events = NULL;
- GST_OBJECT_UNLOCK (typefind);
break;
default:
break;