mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-05 09:00:54 +00:00
mpegts: Always clear packetizer on DISCONT push mode
If a discontinuity is detected in push mode, we need to clear the cached section observations since they might have potentially changed. This was only done properly when operating with TIME segments (dvb, udp, adaptive demuxers, ...) but not with BYTE segments (such as with custom app/fd sources). We still don't want to flush out the PCR observations, since this might be needed for seeking in push-based BYTE sources. Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1650 Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3600>
This commit is contained in:
parent
551580482d
commit
f9c2df6f9a
1 changed files with 11 additions and 7 deletions
|
@ -1523,15 +1523,19 @@ mpegts_base_chain (GstPad * pad, GstObject * parent, GstBuffer * buf)
|
||||||
return res;
|
return res;
|
||||||
|
|
||||||
mpegts_base_flush (base, FALSE);
|
mpegts_base_flush (base, FALSE);
|
||||||
/* In the case of discontinuities in push-mode with TIME segment
|
if (base->mode == BASE_MODE_PUSHING) {
|
||||||
* we want to drop all previous observations (hard:TRUE) from
|
if (base->segment.format == GST_FORMAT_TIME) {
|
||||||
* the packetizer */
|
/* In the case of discontinuities in push-mode with TIME segment
|
||||||
if (base->mode == BASE_MODE_PUSHING
|
* we want to drop all previous observations (hard:TRUE) from
|
||||||
&& base->segment.format == GST_FORMAT_TIME) {
|
* the packetizer */
|
||||||
mpegts_packetizer_flush (base->packetizer, TRUE);
|
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);
|
mpegts_packetizer_clear (base->packetizer);
|
||||||
} else
|
} else {
|
||||||
mpegts_packetizer_flush (base->packetizer, FALSE);
|
mpegts_packetizer_flush (base->packetizer, FALSE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mpegts_packetizer_push (base->packetizer, buf);
|
mpegts_packetizer_push (base->packetizer, buf);
|
||||||
|
|
Loading…
Reference in a new issue