projects
/
platform
/
upstream
/
gst-plugins-good.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7df99f7
)
debugutils: Properly calculate the difference with unsigned types
author
Sebastian Dröge
<sebastian@centricular.com>
Mon, 19 May 2014 09:21:36 +0000
(11:21 +0200)
committer
Sebastian Dröge
<sebastian@centricular.com>
Mon, 19 May 2014 09:21:36 +0000
(11:21 +0200)
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);
gst/debugutils/tests.c
patch
|
blob
|
history
diff --git
a/gst/debugutils/tests.c
b/gst/debugutils/tests.c
index
d318664
..
9ca2af9
100644
(file)
--- a/
gst/debugutils/tests.c
+++ b/
gst/debugutils/tests.c
@@
-158,7
+158,8
@@
timedur_add (gpointer test, GstBuffer * buffer)
if (GST_BUFFER_TIMESTAMP_IS_VALID (buffer) &&
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++;
}
if (GST_BUFFER_TIMESTAMP_IS_VALID (buffer) &&