gstreamer/subprojects/gst-plugins-bad/gst/mpegtsdemux
Sebastian Dröge 493f8e440a mpegtsdemux: Handle PTS/DTS wraparound with ignore-pcr=true
The wraparound handling code assumes that the PCR gets updated regularly for
being able to detect wraparounds. With ignore-pcr=true that was not the case and
it stayed initialized at 1h forever.

To avoid this problem, update the fake PCR whenever the PTS advanced by more
than 5s, and also detect wraparounds in these fake PCRs.

Problem can be reproduced with

  $ gst-launch-1.0 videotestsrc pattern=black ! video/x-raw,framerate=1/5 ! \
    x264enc speed-preset=ultrafast tune=zerolatency ! mpegtsmux ! \
    tsdemux ignore-pcr=true ! fakesink

which restarts timestamps at 0 after around 26h30m.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7588>
2024-10-24 15:09:15 +00:00
..
gstmpegdefs.h tsdemux: Fix AC-4 detection 2022-04-14 08:33:34 +02:00
gstmpegdesc.h mpegts: Add support for SMPTE ST-2038 ANC 2024-09-17 19:58:48 +01:00
gsttsdemux.c Move files from gst-plugins-bad into the "subprojects/gst-plugins-bad/" subdir 2021-09-24 16:14:36 -03:00
meson.build meson: Call pkgconfig.generate in the loop where we declare plugins dependencies 2022-09-01 21:17:35 +00:00
mpegtsbase.c mpegtsbase: Fix Program equality check 2024-04-23 11:15:53 +00:00
mpegtsbase.h mpegts: Handle glib < 2.58 2022-03-10 17:24:45 +00:00
mpegtspacketizer.c mpegtsdemux: Handle PTS/DTS wraparound with ignore-pcr=true 2024-10-24 15:09:15 +00:00
mpegtspacketizer.h tsdemux: Don't check SCTE events for being too far from the PCR 2022-03-24 18:59:37 +00:00
mpegtsparse.c mpegtsparse: Don't assert the packet_size when filling for EOS 2021-10-05 09:38:27 +00:00
mpegtsparse.h Move files from gst-plugins-bad into the "subprojects/gst-plugins-bad/" subdir 2021-09-24 16:14:36 -03:00
pesparse.c Move files from gst-plugins-bad into the "subprojects/gst-plugins-bad/" subdir 2021-09-24 16:14:36 -03:00
pesparse.h Move files from gst-plugins-bad into the "subprojects/gst-plugins-bad/" subdir 2021-09-24 16:14:36 -03:00
TODO Move files from gst-plugins-bad into the "subprojects/gst-plugins-bad/" subdir 2021-09-24 16:14:36 -03:00
tsdemux.c common: Stop using GQuark-based GstStructure name API 2024-09-26 19:21:29 +03:00
tsdemux.h tsdemux: Handle delayed seek events 2021-10-14 21:45:00 +00:00