mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-23 15:48:23 +00:00
mpegtspacketizer: avoid timestamp overflows
Cause timing to break in the pipeline that can lead to a stall https://bugzilla.gnome.org/show_bug.cgi?id=733837
This commit is contained in:
parent
4c2ce9eac7
commit
1685c45465
1 changed files with 7 additions and 2 deletions
|
@ -2178,8 +2178,13 @@ mpegts_packetizer_pts_to_ts (MpegTSPacketizer2 * packetizer,
|
|||
*/
|
||||
if (G_UNLIKELY (ABSDIFF (res, pcrtable->last_pcrtime) > 15 * GST_SECOND))
|
||||
res = GST_CLOCK_TIME_NONE;
|
||||
else
|
||||
res += pcrtable->base_time + pcrtable->skew - pcrtable->base_pcrtime;
|
||||
else {
|
||||
GstClockTime tmp = pcrtable->base_time + pcrtable->skew;
|
||||
if (tmp + res > pcrtable->base_pcrtime)
|
||||
res += tmp - pcrtable->base_pcrtime;
|
||||
else
|
||||
res = GST_CLOCK_TIME_NONE;
|
||||
}
|
||||
} else if (packetizer->calculate_offset && pcrtable->groups) {
|
||||
gint64 refpcr = G_MAXINT64, refpcroffset;
|
||||
PCROffsetGroup *group = pcrtable->current->group;
|
||||
|
|
Loading…
Reference in a new issue