mpegtslivesrc: Don't skip the first MPEG-TS packet

If every buffer contains only a single MPEG-TS packet we would otherwise
skip over everything and would never observe a PCR.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1651>
This commit is contained in:
Sebastian Dröge 2024-07-04 17:01:43 +03:00
parent c701aa6f84
commit 4ab8d92f28

View file

@ -227,7 +227,7 @@ fn find_pcr(slice: &[u8], imp: &MpegTsLiveSource) -> Result<Option<u64>> {
};
let mut buffer_pcr = None;
for chunk in slice[pos + 188..].chunks_exact(188) {
for chunk in slice[pos..].chunks_exact(188) {
if chunk[0] != 0x47 {
gst::error!(CAT, "Lost sync");
break;