From: <bi...@ke...> - 2007-02-20 15:45:16
|
CVS Root: /cvs/gstreamer Module: gst-plugins-base Changes by: bilboed Date: Tue Feb 20 2007 15:44:44 UTC Log message: * 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. Modified files: . : ChangeLog gst/playback : gstdecodebin2.c Links: http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-base/ChangeLog.diff?r1=1.3159&r2=1.3160 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-base/gst/playback/gstdecodebin2.c.diff?r1=1.11&r2=1.12 ====Begin Diffs==== Index: ChangeLog =================================================================== RCS file: /cvs/gstreamer/gst-plugins-base/ChangeLog,v retrieving revision 1.3159 retrieving revision 1.3160 diff -u -d -r1.3159 -r1.3160 --- ChangeLog 20 Feb 2007 11:20:51 -0000 1.3159 +++ ChangeLog 20 Feb 2007 15:44:31 -0000 1.3160 @@ -1,5 +1,14 @@ 2007-02-20 Edward Hervey <ed...@fl...> + * 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 <ed...@fl...> * gst/playback/gstdecodebin2.c: (connect_element), (pad_added_group_cb), (gst_decode_group_check_if_blocked), (sort_end_pads), (gst_decode_group_expose): Index: gstdecodebin2.c RCS file: /cvs/gstreamer/gst-plugins-base/gst/playback/gstdecodebin2.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- gstdecodebin2.c 20 Feb 2007 11:20:52 -0000 1.11 +++ gstdecodebin2.c 20 Feb 2007 15:44:32 -0000 1.12 @@ -71,6 +71,8 @@ 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 */ @@ -497,6 +499,14 @@ 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; @@ -1269,7 +1279,6 @@ 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); @@ -1518,7 +1527,6 @@ } @@ -1704,6 +1712,7 @@ GROUP_MUTEX_UNLOCK (group); group->dbin->activegroup = NULL; + group->dbin->oldgroups = g_list_append (group->dbin->oldgroups, group); } static void |