basetsmux: don't reset pad on flush_stop
This was mistakenly added when porting to aggregator, this restores the old behaviour, by only resetting them when the muxer itself is reset
This commit is contained in:
parent
f9c0367619
commit
f5495700fb
@ -137,7 +137,23 @@ gst_base_ts_mux_pad_reset (GstBaseTsMuxPad * pad)
|
|||||||
static GstFlowReturn
|
static GstFlowReturn
|
||||||
gst_base_ts_mux_pad_flush (GstAggregatorPad * agg_pad, GstAggregator * agg)
|
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;
|
return GST_FLOW_OK;
|
||||||
}
|
}
|
||||||
@ -285,6 +301,7 @@ gst_base_ts_mux_reset (GstBaseTsMux * mux, gboolean alloc)
|
|||||||
GstBuffer *buf;
|
GstBuffer *buf;
|
||||||
GstBaseTsMuxClass *klass = GST_BASE_TS_MUX_GET_CLASS (mux);
|
GstBaseTsMuxClass *klass = GST_BASE_TS_MUX_GET_CLASS (mux);
|
||||||
GHashTable *si_sections = NULL;
|
GHashTable *si_sections = NULL;
|
||||||
|
GList *l;
|
||||||
|
|
||||||
mux->first = TRUE;
|
mux->first = TRUE;
|
||||||
mux->last_flow_ret = GST_FLOW_OK;
|
mux->last_flow_ret = GST_FLOW_OK;
|
||||||
@ -318,6 +335,10 @@ gst_base_ts_mux_reset (GstBaseTsMux * mux, gboolean alloc)
|
|||||||
gst_event_replace (&mux->force_key_unit_event, NULL);
|
gst_event_replace (&mux->force_key_unit_event, NULL);
|
||||||
gst_buffer_replace (&mux->out_buffer, 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) {
|
if (alloc) {
|
||||||
g_assert (klass->create_ts_mux);
|
g_assert (klass->create_ts_mux);
|
||||||
|
|
||||||
@ -1325,25 +1346,6 @@ gst_base_ts_mux_sink_event (GstAggregator * agg, GstAggregatorPad * agg_pad,
|
|||||||
*/
|
*/
|
||||||
break;
|
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:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user