Skip to content

srt: Fix "Fix timestamping"

  • Defend against missing clock. If we don't have a clock, stop the source instead of asserting in gst_clock_get_time. This can happen when the element is removed from the pipeline while it's playing.
  • Don't calculate a delay if the srctime is 0. A zero srctime is a missing srctime. Apparently this can happen when "the connection is not between SRT peers or if Timestamp-Based Packet Delivery mode (TSBPDMODE) is not enabled" so it may not apply to us, but it's best to be defensive.
  • Prevent delay from being negative. delay should be a GstClockTimeDiff since SRT time is int64_t. All values are in local time so we should never see a srctime that's in the future. If we do, clamp the delay to 0 and warn about it.
Edited by Jan Alexander Steffens

Merge request reports