tsdemux: Handle PCR-less streams
authorEdward Hervey <edward@centricular.com>
Thu, 22 Jul 2021 13:14:26 +0000 (15:14 +0200)
committerEdward Hervey <bilboed@bilboed.com>
Thu, 22 Jul 2021 13:22:13 +0000 (15:22 +0200)
commita79a756b79aa1675e4ae14eced8b08cdd578d50a
treefd5525ddc3b8bfd0f169cb7cf8c1bca49ada4672
parent0c8d41b8b0aa94548287731760b69249777e988d
tsdemux: Handle PCR-less streams

Some programs specify a PCR PID but don't actually store any PCR values, or are
way too far apart.

In order to gracefully handle those situations, we will queue up to a certain
amount of pending buffers before deciding to give up on that PCR PID and not use
any (i.e. using DTS/PTS values as-is)

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1629

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2422>
gst/mpegtsdemux/tsdemux.c