summaryrefslogtreecommitdiff
path: root/gst/mpegtsmux
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2018-03-29 19:03:45 +0300
committerSebastian Dröge <sebastian@centricular.com>2018-04-03 14:38:15 +0300
commit7a2110a4993da33b9513c58ae0ac8ee1945a5faf (patch)
treedeaa2f9242dd6db22b4d042e3986fc8c223c7b31 /gst/mpegtsmux
parent35b6411d4db9e4f56a4b8af1f1f6fce040841cf8 (diff)
downloadgstreamer-plugins-bad-7a2110a4993da33b9513c58ae0ac8ee1945a5faf.tar.gz
mpegtsmux: Resend initial segments and header sections after FLUSH_STOP
https://bugzilla.gnome.org/show_bug.cgi?id=794816
Diffstat (limited to 'gst/mpegtsmux')
-rw-r--r--gst/mpegtsmux/mpegtsmux.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/gst/mpegtsmux/mpegtsmux.c b/gst/mpegtsmux/mpegtsmux.c
index 99562fd45..3e07f4bfd 100644
--- a/gst/mpegtsmux/mpegtsmux.c
+++ b/gst/mpegtsmux/mpegtsmux.c
@@ -1086,6 +1086,25 @@ mpegtsmux_sink_event (GstCollectPads * pads, GstCollectData * data,
}
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;
}