mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 06:46:38 +00:00
midiparse: Push stream-start event before anything else
This commit is contained in:
parent
668dcf0c09
commit
357779d3c6
1 changed files with 5 additions and 0 deletions
|
@ -973,6 +973,7 @@ gst_midi_parse_parse_song (GstMidiParse * midiparse)
|
|||
GstCaps *outcaps;
|
||||
guint8 *data;
|
||||
guint size, offset, length;
|
||||
gchar *stream_id;
|
||||
|
||||
GST_DEBUG_OBJECT (midiparse, "Parsing song");
|
||||
|
||||
|
@ -1003,6 +1004,10 @@ gst_midi_parse_parse_song (GstMidiParse * midiparse)
|
|||
GST_DEBUG_OBJECT (midiparse, "song duration %" GST_TIME_FORMAT,
|
||||
GST_TIME_ARGS (midiparse->segment.duration));
|
||||
|
||||
stream_id = gst_pad_create_stream_id (midiparse->srcpad, GST_ELEMENT_CAST (midiparse), NULL);
|
||||
gst_pad_push_event (midiparse->srcpad, gst_event_new_stream_start (stream_id));
|
||||
g_free (stream_id);
|
||||
|
||||
outcaps = gst_pad_get_pad_template_caps (midiparse->srcpad);
|
||||
gst_pad_set_caps (midiparse->srcpad, outcaps);
|
||||
gst_caps_unref (outcaps);
|
||||
|
|
Loading…
Reference in a new issue