mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 16:50:47 +00:00
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
This commit is contained in:
parent
4e88633de4
commit
0bb9b75a75
1 changed files with 5 additions and 2 deletions
|
@ -994,6 +994,7 @@ gst_audio_test_src_create (GstBaseSrc * basesrc, guint64 offset,
|
||||||
GstClockTime next_time;
|
GstClockTime next_time;
|
||||||
gint64 next_sample, next_byte;
|
gint64 next_sample, next_byte;
|
||||||
guint bytes, samples;
|
guint bytes, samples;
|
||||||
|
GstElementClass *eclass;
|
||||||
|
|
||||||
src = GST_AUDIO_TEST_SRC (basesrc);
|
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_list_add (taglist, GST_TAG_MERGE_APPEND,
|
||||||
GST_TAG_DESCRIPTION, "audiotest wave", NULL);
|
GST_TAG_DESCRIPTION, "audiotest wave", NULL);
|
||||||
|
|
||||||
gst_element_send_event ((GstElement *) basesrc,
|
eclass = GST_ELEMENT_CLASS (parent_class);
|
||||||
gst_event_new_tag (taglist));
|
if (eclass->send_event)
|
||||||
|
eclass->send_event (GST_ELEMENT_CAST (basesrc),
|
||||||
|
gst_event_new_tag (taglist));
|
||||||
src->tags_pushed = TRUE;
|
src->tags_pushed = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue