From 96d3bbd82e5ef1ca17cf46dd231af0ab762d3817 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Wed, 22 Dec 2004 10:06:02 +0000 Subject: [PATCH] gst/playback/gstplaybasebin.c: Revert patch 1.38 as clock distribution over schedulers does not work correcly in the ... Original commit message from CVS: * gst/playback/gstplaybasebin.c: (gst_play_base_bin_add_element): Revert patch 1.38 as clock distribution over schedulers does not work correcly in the core yet. --- ChangeLog | 6 ++++++ gst/playback/gstplaybasebin.c | 9 +++++++++ 2 files changed, 15 insertions(+) diff --git a/ChangeLog b/ChangeLog index 9c05321..3f181ae 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2004-12-22 Wim Taymans + + * gst/playback/gstplaybasebin.c: (gst_play_base_bin_add_element): + Revert patch 1.38 as clock distribution over schedulers does + not work correcly in the core yet. + 2004-12-21 Stephane Loeuillet * sys/oss/README: remove this file, which predates my birth diff --git a/gst/playback/gstplaybasebin.c b/gst/playback/gstplaybasebin.c index c412eb5..3f27660 100644 --- a/gst/playback/gstplaybasebin.c +++ b/gst/playback/gstplaybasebin.c @@ -1312,6 +1312,9 @@ gst_play_base_bin_add_element (GstBin * bin, GstElement * element) play_base_bin = GST_PLAY_BASE_BIN (bin); if (play_base_bin->thread) { + GstScheduler *sched; + GstClock *clock; + if (play_base_bin->threaded) { gchar *name; GstElement *thread; @@ -1324,6 +1327,12 @@ gst_play_base_bin_add_element (GstBin * bin, GstElement * element) element = thread; } gst_bin_add (GST_BIN (play_base_bin->thread), element); + + /* hack, the clock is not correctly distributed in the core */ + sched = gst_element_get_scheduler (GST_ELEMENT (play_base_bin->thread)); + clock = gst_scheduler_get_clock (sched); + gst_scheduler_set_clock (sched, clock); + } else { g_warning ("adding elements is not allowed in NULL"); } -- 2.7.4