diff options
Diffstat (limited to 'gst/liveadder/liveadder.c')
-rw-r--r-- | gst/liveadder/liveadder.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gst/liveadder/liveadder.c b/gst/liveadder/liveadder.c index 9d7353e3..8c1a04c0 100644 --- a/gst/liveadder/liveadder.c +++ b/gst/liveadder/liveadder.c @@ -1206,8 +1206,12 @@ gst_live_adder_loop (gpointer data) */ if (GST_CLOCK_TIME_IS_VALID (adder->next_timestamp) && GST_BUFFER_TIMESTAMP (buffer) != adder->next_timestamp) { - if (llabs (GST_BUFFER_TIMESTAMP (buffer) - adder->next_timestamp) < - GST_SECOND / adder->rate) { + GstClockTimeDiff diff = GST_CLOCK_DIFF (GST_BUFFER_TIMESTAMP (buffer), + adder->next_timestamp); + if (diff < 0) + diff = -diff; + + if (diff < GST_SECOND / adder->rate) { GST_BUFFER_TIMESTAMP (buffer) = adder->next_timestamp; GST_DEBUG_OBJECT (adder, "Correcting slight skew"); GST_BUFFER_FLAG_UNSET(buffer, GST_BUFFER_FLAG_DISCONT); |