diff options
author | Olivier Crete <olivier.crete@collabora.co.uk> | 2008-05-21 17:20:05 +0000 |
---|---|---|
committer | Edward Hervey <bilboed@bilboed.com> | 2009-02-17 19:29:06 +0100 |
commit | 9e6d4708f8a5e963f1487691b44d9e019944d31a (patch) | |
tree | b0007a0807c937c26441da8c5758b8eeee0b3175 /gst | |
parent | 91dcd54ae5b2b6c9e2dde5a2de422555e2ef37d4 (diff) | |
download | gst-plugins-bad-9e6d4708f8a5e963f1487691b44d9e019944d31a.tar.gz gst-plugins-bad-9e6d4708f8a5e963f1487691b44d9e019944d31a.tar.bz2 gst-plugins-bad-9e6d4708f8a5e963f1487691b44d9e019944d31a.zip |
[MOVED FROM GST-P-FARSIGHT] Replace C99 llabs with C89 code
20080521172005-3e2dc-8e637d1daa0e27cc2edae1fdfd0dbf23896fb5bc.gz
Diffstat (limited to 'gst')
-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); |