gst/gstpipeline.c: call gst_scheduler_reset on dispose (fixes #141416)

Original commit message from CVS:
* gst/gstpipeline.c: (gst_pipeline_dispose),
(gst_pipeline_change_state):
call gst_scheduler_reset on dispose (fixes #141416)
This commit is contained in:
Benjamin Otte 2004-05-12 23:43:03 +00:00
parent ac83b103a1
commit 953f54c5ce
2 changed files with 11 additions and 10 deletions

View file

@ -1,3 +1,9 @@
2004-05-13 Benjamin Otte <otte@gnome.org>
* gst/gstpipeline.c: (gst_pipeline_dispose),
(gst_pipeline_change_state):
call gst_scheduler_reset on dispose (fixes #141416)
2004-05-11 Benjamin Otte <in7y118@public.uni-hamburg.de> 2004-05-11 Benjamin Otte <in7y118@public.uni-hamburg.de>
* gst/elements/gstfilesrc.c: (gst_filesrc_get_mmap): * gst/elements/gstfilesrc.c: (gst_filesrc_get_mmap):

View file

@ -132,10 +132,13 @@ static void
gst_pipeline_dispose (GObject * object) gst_pipeline_dispose (GObject * object)
{ {
GstPipeline *pipeline = GST_PIPELINE (object); GstPipeline *pipeline = GST_PIPELINE (object);
GstScheduler *sched;
g_assert (GST_IS_SCHEDULER (GST_ELEMENT_SCHED (pipeline)));
sched = GST_ELEMENT_SCHED (pipeline);
gst_scheduler_reset (sched);
G_OBJECT_CLASS (parent_class)->dispose (object); G_OBJECT_CLASS (parent_class)->dispose (object);
gst_object_replace ((GstObject **) & GST_ELEMENT_SCHED (pipeline), NULL);
} }
/** /**
@ -163,15 +166,7 @@ gst_pipeline_change_state (GstElement * element)
case GST_STATE_PAUSED_TO_PLAYING: case GST_STATE_PAUSED_TO_PLAYING:
case GST_STATE_PLAYING_TO_PAUSED: case GST_STATE_PLAYING_TO_PAUSED:
case GST_STATE_PAUSED_TO_READY: case GST_STATE_PAUSED_TO_READY:
break;
case GST_STATE_READY_TO_NULL: case GST_STATE_READY_TO_NULL:
/* FIXME: calling gst_scheduler_reset() here is bad, since we
* might not be in cothread 0 */
#if 0
if (GST_ELEMENT_SCHED (element)) {
gst_scheduler_reset (GST_ELEMENT_SCHED (element));
}
#endif
break; break;
} }