diff --git a/daemon/codec.c b/daemon/codec.c index 27997661a..20487ed00 100644 --- a/daemon/codec.c +++ b/daemon/codec.c @@ -2533,11 +2533,12 @@ void codec_output_rtp(struct media_packet *mp, struct codec_scheduler *csch, } send: - ilogs(transcoding, LOG_DEBUG, "Scheduling to send RTP packet (seq %u TS %lu) in %" PRId64 ".%01ld ms (at %" PRId64 ".%06" PRId64 ")", + ilogs(transcoding, LOG_DEBUG, "Scheduling to send RTP packet (seq %u TS %lu) in %" + PRId64 ".%01lld ms (at %" PRId64 ".%06" PRId64 ")", ntohs(rh->seq_num), ts, ts_diff_us / 1000, - labs((ts_diff_us % 1000) / 100), + llabs(((long long) ts_diff_us % 1000) / 100), p->ttq_entry.when / 1000000, p->ttq_entry.when % 1000000); @@ -3717,7 +3718,7 @@ static bool __dtx_drift_shift(struct dtx_buffer *dtxb, unsigned long ts, if (tv_diff < rtpe_config.dtx_delay_us) { // timer underflow ilogs(dtx, LOG_DEBUG, "Packet reception time has caught up with DTX timer " - "(%li ms < %" PRId64 " ms), " + "(%" PRId64 " ms < %" PRId64 " ms), " "pushing DTX timer forward my %" PRId64 " ms", tv_diff / 1000, rtpe_config.dtx_delay_us / 1000L, rtpe_config.dtx_shift_us / 1000L); @@ -3843,7 +3844,7 @@ static void __dtx_send_later(struct codec_timer *ct) { dtxb->head_ts, ts, ts_diff_us / 1000); else if (ts_diff >= dtxb->tspp * 2) { ilogs(dtx, LOG_DEBUG, "First packet in DTX buffer not ready yet (packet TS %lu, " - "DTX TS %lu, diff %li)", + "DTX TS %lu, diff %" PRId64 ")", ts, dtxb->head_ts, ts_diff); dtxp = NULL; } diff --git a/lib/bufferpool.h b/lib/bufferpool.h index baa56c435..de03d95fa 100644 --- a/lib/bufferpool.h +++ b/lib/bufferpool.h @@ -6,7 +6,7 @@ #define BUFFERPOOL_ALIGNMENT (sizeof(void *)) // bytes #define BUFFERPOOL_ALIGN(x) (((x + BUFFERPOOL_ALIGNMENT - 1) / BUFFERPOOL_ALIGNMENT) * BUFFERPOOL_ALIGNMENT) -#define BUFFERPOOL_SHARD_SIZE (1LL<<24) // 16 MB, must be a power of two +#define BUFFERPOOL_SHARD_SIZE ((size_t) (1LL<<24)) // 16 MB, must be a power of two #define BUFFERPOOL_OVERHEAD BUFFERPOOL_ALIGN(sizeof(void *)) // storage space not available #define BUFFERPOOL_BOTTOM_MASK (BUFFERPOOL_SHARD_SIZE - 1)