mpegtspacketizer: Fix ts_to_offset beyond last observed PCR

The requested TS might be beyond the last observed PCR. In order to calculate
a coherent offset, we need to use the last and previous-to-last groups.

https://bugzilla.gnome.org/show_bug.cgi?id=721035
This commit is contained in:
Edward Hervey 2013-12-29 16:00:01 +01:00
parent cd3c3ebf01
commit c229a87ac3

View file

@ -2235,6 +2235,11 @@ mpegts_packetizer_ts_to_offset (MpegTSPacketizer2 * packetizer,
break;
}
if (tmp->next == NULL) {
GST_DEBUG ("pcr is beyond last group");
break;
}
prevgroup = nextgroup;
/* Maybe it's in this group */