return res;
mpegts_base_flush (base, FALSE);
- /* In the case of discontinuities in push-mode with TIME segment
- * we want to drop all previous observations (hard:TRUE) from
- * the packetizer */
- if (base->mode == BASE_MODE_PUSHING
- && base->segment.format == GST_FORMAT_TIME) {
- mpegts_packetizer_flush (base->packetizer, TRUE);
+ if (base->mode == BASE_MODE_PUSHING) {
+ if (base->segment.format == GST_FORMAT_TIME) {
+ /* In the case of discontinuities in push-mode with TIME segment
+ * we want to drop all previous observations (hard:TRUE) from
+ * the packetizer */
+ mpegts_packetizer_flush (base->packetizer, TRUE);
+ }
+ /* In all cases, we clear observations when we get a discontinuity in
+ * push-mode to re-check if the sections (PAT/PMT) changed or not */
mpegts_packetizer_clear (base->packetizer);
- } else
+ } else {
mpegts_packetizer_flush (base->packetizer, FALSE);
+ }
}
mpegts_packetizer_push (base->packetizer, buf);