to fix coverity issue, use GST_CLOCK_DIFF to get time-diff of buffer pts time.
(pts is unsigned value, diff of two buffer timestamp always returns unsigned value)
Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
return FALSE;
}
- if (pad->buffer != NULL
- && ABS (tensor_merge->current_time - GST_BUFFER_PTS (pad->buffer)) <
- ABS (tensor_merge->current_time - GST_BUFFER_PTS (buf))) {
+ if (pad->buffer != NULL &&
+ ABS (GST_CLOCK_DIFF (tensor_merge->current_time,
+ GST_BUFFER_PTS (pad->buffer))) <
+ ABS (GST_CLOCK_DIFF (tensor_merge->current_time,
+ GST_BUFFER_PTS (buf)))) {
gst_buffer_unref (buf);
buf = pad->buffer;
} else {