mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-23 15:48:23 +00:00
debugutils: Properly calculate the difference with unsigned types
tests.c:161:16: error: taking the absolute value of unsigned type 'unsigned long' has no effect [-Werror,-Wabsolute-value] t->diff += labs (GST_BUFFER_TIMESTAMP (buffer) - t->expected);
This commit is contained in:
parent
7df99f7469
commit
97fb3655df
1 changed files with 2 additions and 1 deletions
|
@ -158,7 +158,8 @@ timedur_add (gpointer test, GstBuffer * buffer)
|
||||||
|
|
||||||
if (GST_BUFFER_TIMESTAMP_IS_VALID (buffer) &&
|
if (GST_BUFFER_TIMESTAMP_IS_VALID (buffer) &&
|
||||||
GST_CLOCK_TIME_IS_VALID (t->expected)) {
|
GST_CLOCK_TIME_IS_VALID (t->expected)) {
|
||||||
t->diff += labs (GST_BUFFER_TIMESTAMP (buffer) - t->expected);
|
t->diff +=
|
||||||
|
ABS (GST_CLOCK_DIFF (t->expected, GST_BUFFER_TIMESTAMP (buffer)));
|
||||||
t->count++;
|
t->count++;
|
||||||
}
|
}
|
||||||
if (GST_BUFFER_TIMESTAMP_IS_VALID (buffer) &&
|
if (GST_BUFFER_TIMESTAMP_IS_VALID (buffer) &&
|
||||||
|
|
Loading…
Reference in a new issue