multipartmux: Re-set need_segment flag after FLUSH_STOP

https://bugzilla.gnome.org/show_bug.cgi?id=703182
This commit is contained in:
Ognyan Tonchev 2013-06-27 13:26:31 +02:00 committed by Sebastian Dröge
parent 07e4dd3424
commit aa2d96c46b

View file

@ -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