audiotestsrc: Make sure tags are properly serialized. Fixes #588746
We do this by letting the basesrc base class handle the tags.
This commit is contained in:
parent
50b0cf2c03
commit
196b38d4ef
@ -1000,15 +1000,14 @@ gst_audio_test_src_create (GstBaseSrc * basesrc, guint64 offset,
|
|||||||
/* example for tagging generated data */
|
/* example for tagging generated data */
|
||||||
if (!src->tags_pushed) {
|
if (!src->tags_pushed) {
|
||||||
GstTagList *taglist;
|
GstTagList *taglist;
|
||||||
GstEvent *event;
|
|
||||||
|
|
||||||
taglist = gst_tag_list_new ();
|
taglist = gst_tag_list_new ();
|
||||||
|
|
||||||
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);
|
||||||
|
|
||||||
event = gst_event_new_tag (taglist);
|
gst_element_send_event ((GstElement *) basesrc,
|
||||||
gst_pad_push_event (basesrc->srcpad, event);
|
gst_event_new_tag (taglist));
|
||||||
src->tags_pushed = TRUE;
|
src->tags_pushed = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user