gst/playback/gstplaybasebin.c: Thread safety.

Original commit message from CVS:
* gst/playback/gstplaybasebin.c: (probe_triggered):
Thread safety.
This commit is contained in:
Ronald S. Bultje 2005-01-16 14:38:40 +00:00
parent 11137a88a3
commit dfd05ab3ef
2 changed files with 12 additions and 0 deletions

View file

@ -1,3 +1,8 @@
2005-01-16 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
* gst/playback/gstplaybasebin.c: (probe_triggered):
Thread safety.
2005-01-16 Jan Schmidt <thaytan@mad.scientist.com>
* ext/swfdec/gstswfdec.c: (gst_swfdec_change_state):

View file

@ -656,8 +656,15 @@ probe_triggered (GstProbe * probe, GstData ** data, gpointer user_data)
gst_play_base_bin_signals[GROUP_SWITCH_SIGNAL], 0);
/* removing the current group brings the next group
* active */
g_mutex_lock (play_base_bin->group_lock);
play_base_bin->queued_groups =
g_list_remove (play_base_bin->queued_groups, group);
while (!play_base_bin->queued_groups) {
GST_DEBUG ("Waiting for new groups");
g_cond_wait (play_base_bin->group_cond, play_base_bin->group_lock);
GST_DEBUG ("done");
}
g_mutex_unlock (play_base_bin->group_lock);
setup_substreams (play_base_bin);
GST_DEBUG ("switching to next group %p",
play_base_bin->queued_groups->data);