[Bug 785733] New: rtpbin: ntp-sync does no sanity checking for clock sync

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Wed Aug 2 13:34:45 UTC 2017


https://bugzilla.gnome.org/show_bug.cgi?id=785733

            Bug ID: 785733
           Summary: rtpbin: ntp-sync does no sanity checking for clock
                    sync
    Classification: Platform
           Product: GStreamer
           Version: git master
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: Normal
         Component: gst-plugins-good
          Assignee: gstreamer-bugs at lists.freedesktop.org
          Reporter: patrick.radizi at axis.com
        QA Contact: gstreamer-bugs at lists.freedesktop.org
     GNOME version: ---

The ntp-sync parameter of rtpbin synchronizes received streams based on the
assumption that sender and receiver clocks are in sync. If they are not, an
arbitrarily large time offset can be applied to each received buffer. Since NTP
can take quite some time before all clocks are in sync, this leads to corrupt
timestamps before all clocks have 'settled' in.

A sanity check of the calculated time offset is thus needed. If to large it
would be better to simply skip the offset.

Furthermore, currently a positive time offset might be applied. But if a
positive offset is calculated it must mean that the clocks are not in sync. A
buffer will obviously always arrive 'late' at the receiver, so to get its
creation time we need to remove, not add time.

A timestamp offset sanity check could be 

if (ts_offset < 0 && > -SOME_LIMIT)
  apply offset
else
  skip offset

When synchronizing streams without ntp the rtpbin currently does a sanity check
and it will not apply an offset larger than 3 sec.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list