static GstFlowReturn
gst_base_ts_mux_pad_flush (GstAggregatorPad * agg_pad, GstAggregator * agg)
{
- gst_base_ts_mux_pad_reset (GST_BASE_TS_MUX_PAD (agg_pad));
+ GList *cur;
+ GstBaseTsMux *mux = GST_BASE_TS_MUX (agg);
+
+ /* Send initial segments again after a flush-stop, and also resend the
+ * header sections */
+ mux->first = TRUE;
+
+ /* output PAT, SI tables */
+ tsmux_resend_pat (mux->tsmux);
+ tsmux_resend_si (mux->tsmux);
+
+ /* output PMT for each program */
+ for (cur = mux->tsmux->programs; cur; cur = cur->next) {
+ TsMuxProgram *program = (TsMuxProgram *) cur->data;
+
+ tsmux_resend_pmt (program);
+ }
return GST_FLOW_OK;
}
GstBuffer *buf;
GstBaseTsMuxClass *klass = GST_BASE_TS_MUX_GET_CLASS (mux);
GHashTable *si_sections = NULL;
+ GList *l;
mux->first = TRUE;
mux->last_flow_ret = GST_FLOW_OK;
gst_event_replace (&mux->force_key_unit_event, NULL);
gst_buffer_replace (&mux->out_buffer, NULL);
+ for (l = GST_ELEMENT (mux)->sinkpads; l; l = l->next) {
+ gst_base_ts_mux_pad_reset (GST_BASE_TS_MUX_PAD (l->data));
+ }
+
if (alloc) {
g_assert (klass->create_ts_mux);
*/
break;
}
- case GST_EVENT_FLUSH_STOP:{
- GList *cur;
-
- /* Send initial segments again after a flush-stop, and also resend the
- * header sections */
- mux->first = TRUE;
-
- /* output PAT, SI tables */
- tsmux_resend_pat (mux->tsmux);
- tsmux_resend_si (mux->tsmux);
-
- /* output PMT for each program */
- for (cur = mux->tsmux->programs; cur; cur = cur->next) {
- TsMuxProgram *program = (TsMuxProgram *) cur->data;
-
- tsmux_resend_pmt (program);
- }
- break;
- }
default:
break;
}