From a6c7e9403a282f724cdb65fa91679c7ff000bb95 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Wed, 31 Mar 2021 14:41:13 -0400 Subject: [PATCH] TT#14008 fix output of negative fractional numbers Change-Id: I70e6589ac5a61103165127fd3fd5d768641ccfab --- daemon/codec.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/daemon/codec.c b/daemon/codec.c index af444e426..339381721 100644 --- a/daemon/codec.c +++ b/daemon/codec.c @@ -1917,11 +1917,12 @@ static void __output_rtp(struct media_packet *mp, struct codec_ssrc_handler *ch, ch->first_send_ts += ch->encoder_format.clockrate / 100; } - ilogs(transcoding, LOG_DEBUG, "Scheduling to send RTP packet (seq %u TS %lu) in %lli.%01lli ms (at %lu.%06lu)", + ilogs(transcoding, LOG_DEBUG, "Scheduling to send RTP packet (seq %u TS %lu) in %s%lli.%01lli ms (at %lu.%06lu)", ntohs(rh->seq_num), ts, - ts_diff_us / 1000, - (ts_diff_us % 1000) / 100, + ts_diff_us < 0 ? "-" : "", + llabs(ts_diff_us / 1000), + llabs((ts_diff_us % 1000) / 100), (long unsigned) p->ttq_entry.when.tv_sec, (long unsigned) p->ttq_entry.when.tv_usec);