Commit aa2d96c4 authored by Ognyan Tonchev's avatar Ognyan Tonchev Committed by Sebastian Dröge

multipartmux: Re-set need_segment flag after FLUSH_STOP

https://bugzilla.gnome.org/show_bug.cgi?id=703182
parent 07e4dd34
......@@ -85,6 +85,8 @@ static GstPad *gst_multipart_mux_request_new_pad (GstElement * element,
static GstStateChangeReturn gst_multipart_mux_change_state (GstElement *
element, GstStateChange transition);
static gboolean gst_multipart_mux_sink_event (GstCollectPads * pads,
GstCollectData * pad, GstEvent * event, GstMultipartMux * mux);
static GstFlowReturn gst_multipart_mux_collected (GstCollectPads * pads,
GstMultipartMux * mux);
......@@ -150,6 +152,9 @@ gst_multipart_mux_init (GstMultipartMux * multipart_mux)
multipart_mux->boundary = g_strdup (DEFAULT_BOUNDARY);
multipart_mux->collect = gst_collect_pads_new ();
gst_collect_pads_set_event_function (multipart_mux->collect,
(GstCollectPadsEventFunction) GST_DEBUG_FUNCPTR (gst_multipart_mux_sink_event),
multipart_mux);
gst_collect_pads_set_function (multipart_mux->collect,
(GstCollectPadsFunction) GST_DEBUG_FUNCPTR (gst_multipart_mux_collected),
multipart_mux);
......@@ -376,6 +381,27 @@ gst_multipart_mux_queue_pads (GstMultipartMux * mux)
return bestpad;
}
static gboolean
gst_multipart_mux_sink_event (GstCollectPads * pads, GstCollectData * data,
GstEvent * event, GstMultipartMux * mux)
{
gboolean ret;
switch (GST_EVENT_TYPE (event)) {
case GST_EVENT_FLUSH_STOP:
{
mux->need_segment = TRUE;
break;
}
default:
break;
}
ret = gst_collect_pads_event_default (pads, data, event, FALSE);
return ret;
}
/* basic idea:
*
* 1) find a pad to pull on, this is done by pulling on all pads and
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment