mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 11:45:25 +00:00
tsdemux: do not try to compare a PCR with itself for statistics
Especially as one of the logs will cause a divide by zero. https://bugzilla.gnome.org/show_bug.cgi?id=656927
This commit is contained in:
parent
b19a5ea1f3
commit
66dbdfd4d1
1 changed files with 10 additions and 8 deletions
|
@ -1772,14 +1772,16 @@ beach:
|
|||
pcroffset->pcr = pcrs[nbpcr - 1];
|
||||
pcroffset->offset = pcroffs[nbpcr - 1];
|
||||
}
|
||||
GST_DEBUG ("pcrdiff:%" GST_TIME_FORMAT " offsetdiff %" G_GUINT64_FORMAT,
|
||||
GST_TIME_ARGS (PCRTIME_TO_GSTTIME (pcrs[nbpcr - 1] - pcrs[0])),
|
||||
pcroffs[nbpcr - 1] - pcroffs[0]);
|
||||
GST_DEBUG ("Estimated bitrate %" G_GUINT64_FORMAT,
|
||||
gst_util_uint64_scale (GST_SECOND, pcroffs[nbpcr - 1] - pcroffs[0],
|
||||
PCRTIME_TO_GSTTIME (pcrs[nbpcr - 1] - pcrs[0])));
|
||||
GST_DEBUG ("Average PCR interval %" G_GUINT64_FORMAT,
|
||||
(pcroffs[nbpcr - 1] - pcroffs[0]) / nbpcr);
|
||||
if (nbpcr > 1) {
|
||||
GST_DEBUG ("pcrdiff:%" GST_TIME_FORMAT " offsetdiff %" G_GUINT64_FORMAT,
|
||||
GST_TIME_ARGS (PCRTIME_TO_GSTTIME (pcrs[nbpcr - 1] - pcrs[0])),
|
||||
pcroffs[nbpcr - 1] - pcroffs[0]);
|
||||
GST_DEBUG ("Estimated bitrate %" G_GUINT64_FORMAT,
|
||||
gst_util_uint64_scale (GST_SECOND, pcroffs[nbpcr - 1] - pcroffs[0],
|
||||
PCRTIME_TO_GSTTIME (pcrs[nbpcr - 1] - pcrs[0])));
|
||||
GST_DEBUG ("Average PCR interval %" G_GUINT64_FORMAT,
|
||||
(pcroffs[nbpcr - 1] - pcroffs[0]) / nbpcr);
|
||||
}
|
||||
}
|
||||
/* Swallow any errors if it happened during the end scanning */
|
||||
if (!isinitial)
|
||||
|
|
Loading…
Reference in a new issue