diff options
author | Wim Taymans <wim.taymans@collabora.co.uk> | 2009-07-20 12:51:30 +0200 |
---|---|---|
committer | Wim Taymans <wim.taymans@collabora.co.uk> | 2009-07-20 13:15:32 +0200 |
commit | 0bb9b75a7535b435779a5776fd2ab5e8bf1e9869 (patch) | |
tree | ab7bf5ae7a1435027387508bdadf335acd550857 /gst/audiotestsrc | |
parent | 4e88633de4f301b93291a81bdc850da3a6c3d965 (diff) |
audiotestsrc: call send_event directly
We can't call gst_element_send_event() from a streaming thread as it gets the
state lock. Instead call the send_event method directly until we have a nice API
for this in basesrc.
Fixes #588746
Diffstat (limited to 'gst/audiotestsrc')
-rw-r--r-- | gst/audiotestsrc/gstaudiotestsrc.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gst/audiotestsrc/gstaudiotestsrc.c b/gst/audiotestsrc/gstaudiotestsrc.c index 3d48557d9..2abd41a26 100644 --- a/gst/audiotestsrc/gstaudiotestsrc.c +++ b/gst/audiotestsrc/gstaudiotestsrc.c @@ -994,6 +994,7 @@ gst_audio_test_src_create (GstBaseSrc * basesrc, guint64 offset, GstClockTime next_time; gint64 next_sample, next_byte; guint bytes, samples; + GstElementClass *eclass; src = GST_AUDIO_TEST_SRC (basesrc); @@ -1006,8 +1007,10 @@ gst_audio_test_src_create (GstBaseSrc * basesrc, guint64 offset, gst_tag_list_add (taglist, GST_TAG_MERGE_APPEND, GST_TAG_DESCRIPTION, "audiotest wave", NULL); - gst_element_send_event ((GstElement *) basesrc, - gst_event_new_tag (taglist)); + eclass = GST_ELEMENT_CLASS (parent_class); + if (eclass->send_event) + eclass->send_event (GST_ELEMENT_CAST (basesrc), + gst_event_new_tag (taglist)); src->tags_pushed = TRUE; } |