summaryrefslogtreecommitdiff
path: root/gst
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2014-08-05 10:36:17 +0200
committerSebastian Dröge <sebastian@centricular.com>2014-08-05 10:37:41 +0200
commit9f186c6ab32c1e949916d385186b2d400190add6 (patch)
treebd5dcfa384139c9e433c2f43775055bf15643271 /gst
parent3e5c56e5fb787a57ab07113491020bf54720a993 (diff)
mpegtspacketizer: Convert PCR times to GStreamer times before comparing them against 500 * GST_MSECOND
Otherwise it will believe to detect PCR gaps already when there's a very small gap of a few milliseconds, breaking playback of some files.
Diffstat (limited to 'gst')
-rw-r--r--gst/mpegtsdemux/mpegtspacketizer.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gst/mpegtsdemux/mpegtspacketizer.c b/gst/mpegtsdemux/mpegtspacketizer.c
index 60cb9a2fe..9feb8eddf 100644
--- a/gst/mpegtsdemux/mpegtspacketizer.c
+++ b/gst/mpegtsdemux/mpegtspacketizer.c
@@ -1962,7 +1962,8 @@ record_pcr (MpegTSPacketizer2 * packetizer, MpegTSPCR * pcrtable,
return;
}
/* If PCR diff is greater than 500ms, create new group */
- if (G_UNLIKELY (corpcr - current->pending[current->last].pcr >
+ if (G_UNLIKELY (PCRTIME_TO_GSTTIME (corpcr) -
+ PCRTIME_TO_GSTTIME (current->pending[current->last].pcr) >
500 * PCR_MSECOND)) {
GST_DEBUG ("New PCR more than 500ms away, handling discont");
/* Take values from current and put them in the current group (closing it) */