mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 18:21:04 +00:00
mpegtsdemux: Fix off by one error
Turns out timestamps of zero are valid :) Fixes issues with streams where the PTS/DTS would be equal to the first PCR. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1807>
This commit is contained in:
parent
f9a0efe3ed
commit
50e230a270
1 changed files with 1 additions and 1 deletions
|
@ -2268,7 +2268,7 @@ mpegts_packetizer_pts_to_ts (MpegTSPacketizer2 * packetizer,
|
||||||
res = GST_CLOCK_TIME_NONE;
|
res = GST_CLOCK_TIME_NONE;
|
||||||
else {
|
else {
|
||||||
GstClockTime tmp = pcrtable->base_time + pcrtable->skew;
|
GstClockTime tmp = pcrtable->base_time + pcrtable->skew;
|
||||||
if (tmp + res > pcrtable->base_pcrtime)
|
if (tmp + res >= pcrtable->base_pcrtime)
|
||||||
res += tmp - pcrtable->base_pcrtime;
|
res += tmp - pcrtable->base_pcrtime;
|
||||||
else
|
else
|
||||||
res = GST_CLOCK_TIME_NONE;
|
res = GST_CLOCK_TIME_NONE;
|
||||||
|
|
Loading…
Reference in a new issue