From d229a538dcb3b30ea560d7a09ac7f0c7ed1cec52 Mon Sep 17 00:00:00 2001 From: Stefan Kost Date: Fri, 20 May 2011 13:31:14 +0300 Subject: [PATCH] mad: use signed when caluculating the delta Avoids a <0 check for an unsigned variable. --- ext/mad/gstmad.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/mad/gstmad.c b/ext/mad/gstmad.c index 4d51d71c1b..f066b670b5 100644 --- a/ext/mad/gstmad.c +++ b/ext/mad/gstmad.c @@ -1660,7 +1660,7 @@ gst_mad_chain (GstPad * pad, GstBuffer * buffer) * bigger than half a frame we then use the incoming timestamp * as a reference, otherwise we continue using our accumulated samples * counter */ - if (ABS (mad->total_samples - total) > nsamples / 2) { + if (ABS (((gint64) (mad->total_samples)) - total) > nsamples / 2) { GST_DEBUG_OBJECT (mad, "difference is bigger than half a frame, " "using calculated samples offset %" G_GUINT64_FORMAT, total); /* Override our accumulated samples counter */