[MOVED FROM GST-P-FARSIGHT] Replace C99 llabs with C89 code

20080521172005-3e2dc-8e637d1daa0e27cc2edae1fdfd0dbf23896fb5bc.gz
This commit is contained in:
Olivier Crete 2008-05-21 17:20:05 +00:00 committed by Edward Hervey
parent 91dcd54ae5
commit 9e6d4708f8

View file

@ -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);