Commit 9f186c6a authored by Sebastian Dröge's avatar Sebastian Dröge 🍵

mpegtspacketizer: Convert PCR times to GStreamer times before comparing them...

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.
parent 3e5c56e5
......@@ -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) */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment