2007-02-20 Edward Hervey <edward@fluendo.com>
+ * gst/playback/gstdecodebin2.c: (gst_decode_bin_dispose),
+ (multi_queue_underrun_cb), (gst_decode_group_check_if_drained),
+ (sort_end_pads), (gst_decode_group_expose),
+ (gst_decode_group_hide):
+ Don't free groups from the streaming threads. Just put them aside and
+ free them in dispose.
+
+2007-02-20 Edward Hervey <edward@fluendo.com>
+
* gst/playback/gstdecodebin2.c: (connect_element),
(pad_added_group_cb), (gst_decode_group_check_if_blocked),
(sort_end_pads), (gst_decode_group_expose):
GstDecodeGroup *activegroup; /* group currently active */
GList *groups; /* List of non-active GstDecodeGroups, sorted in
* order of creation. */
+ GList *oldgroups; /* List of no-longer-used GstDecodeGroups.
+ * Should be freed in dispose */
gint nbpads; /* unique identifier for source pads */
GstCaps *caps; /* caps on which to stop decoding */
g_list_free (decode_bin->groups);
decode_bin->groups = NULL;
+ for (tmp = decode_bin->oldgroups; tmp; tmp = g_list_next (tmp)) {
+ GstDecodeGroup *group = (GstDecodeGroup *) tmp->data;
+
+ gst_decode_group_free (group);
+ }
+ g_list_free (decode_bin->oldgroups);
+ decode_bin->oldgroups = NULL;
+
if (decode_bin->caps)
gst_caps_unref (decode_bin->caps);
decode_bin->caps = NULL;
GST_DEBUG_OBJECT (dbin, "Switching to new group");
/* unexpose current active */
gst_decode_group_hide (group);
- gst_decode_group_free (group);
/* expose first group of groups */
gst_decode_group_expose ((GstDecodeGroup *) dbin->groups->data);
GST_DEBUG_OBJECT (dbin, "Switching to new group");
gst_decode_group_hide (group);
- gst_decode_group_free (group);
gst_decode_group_expose ((GstDecodeGroup *) dbin->groups->data);
}
GROUP_MUTEX_UNLOCK (group);
group->dbin->activegroup = NULL;
+ group->dbin->oldgroups = g_list_append (group->dbin->oldgroups, group);
}
static void