wavparse: Push stream-start event in pull mode before anything else

This commit is contained in:
Sebastian Dröge 2013-06-07 13:26:35 +02:00
parent e5fad95306
commit db1c2a28a6

View file

@ -2365,6 +2365,7 @@ gst_wavparse_loop (GstPad * pad)
{ {
GstFlowReturn ret; GstFlowReturn ret;
GstWavParse *wav = GST_WAVPARSE (GST_PAD_PARENT (pad)); GstWavParse *wav = GST_WAVPARSE (GST_PAD_PARENT (pad));
gchar *stream_id;
GST_LOG_OBJECT (wav, "process data"); GST_LOG_OBJECT (wav, "process data");
@ -2374,6 +2375,11 @@ gst_wavparse_loop (GstPad * pad)
if ((ret = gst_wavparse_stream_init (wav)) != GST_FLOW_OK) if ((ret = gst_wavparse_stream_init (wav)) != GST_FLOW_OK)
goto pause; goto pause;
stream_id =
gst_pad_create_stream_id (wav->srcpad, GST_ELEMENT_CAST (wav), NULL);
gst_pad_push_event (wav->srcpad, gst_event_new_stream_start (stream_id));
g_free (stream_id);
wav->state = GST_WAVPARSE_HEADER; wav->state = GST_WAVPARSE_HEADER;
/* fall-through */ /* fall-through */