Browse Source

MT#55283 fix int size issues

Change-Id: Ibd7bdea16ae57a4a86076a05b22bb3ca64be8ce1
(cherry picked from commit 675eb7bea6)
mr13.3
Richard Fuchs 4 months ago
parent
commit
407a14b4dd
4 changed files with 10 additions and 10 deletions
  1. +6
    -6
      daemon/cli.c
  2. +2
    -2
      daemon/codec.c
  3. +1
    -1
      lib/bufferpool.h
  4. +1
    -1
      recording-daemon/notify.c

+ 6
- 6
daemon/cli.c View File

@ -1887,8 +1887,8 @@ static void cli_incoming_media_list_files(str *instr, struct cli_writer *cw, con
if (media_player_get_file_times(name, &mtime, &atime))
cw->cw_printf(cw, STR_FORMAT ", loaded %lu s ago, last used %lu s ago\n",
STR_FMT(name),
(long) rtpe_now.tv_sec - mtime,
(long) rtpe_now.tv_sec - atime);
(long) (rtpe_now.tv_sec - mtime),
(long) (rtpe_now.tv_sec - atime));
str_free(name);
}
}
@ -1901,8 +1901,8 @@ static void cli_incoming_media_list_dbs(str *instr, struct cli_writer *cw, const
time_t atime, mtime;
if (media_player_get_db_times(id, &mtime, &atime))
cw->cw_printf(cw, "%llu, loaded %lu s ago, last used %lu s ago\n", id,
(long) rtpe_now.tv_sec - mtime,
(long) rtpe_now.tv_sec - atime);
(long) (rtpe_now.tv_sec - mtime),
(long) (rtpe_now.tv_sec - atime));
}
}
@ -2071,8 +2071,8 @@ static void cli_incoming_media_list_caches(str *instr, struct cli_writer *cw, co
time_t atime, mtime;
if (media_player_get_cache_times(id, &mtime, &atime))
cw->cw_printf(cw, "%llu, loaded %lu s ago, last used %lu s ago\n", id,
(long) rtpe_now.tv_sec - mtime,
(long) rtpe_now.tv_sec - atime);
(long) (rtpe_now.tv_sec - mtime),
(long) (rtpe_now.tv_sec - atime));
}
}


+ 2
- 2
daemon/codec.c View File

@ -3753,7 +3753,7 @@ static void __dtx_send_later(struct codec_timer *ct) {
else if (ts_diff_us < -100000 || dtxb->discard_old_count > 3)
ilogs(dtx, LOG_DEBUG, "DTX timestamp reset (from %lu to %lu)", dtxb->head_ts, ts);
else if (ts_diff < 0 || (ts_diff == 0 && discarded_old)) {
ilogs(dtx, LOG_DEBUG, "Discarding old packet (TS %lu < %lu, %" PRId64 " ms old)",
ilogs(dtx, LOG_DEBUG, "Discarding old packet (TS %lu < %lu, %ld ms old)",
ts, dtxb->head_ts, -ts_diff);
t_queue_pop_head(&dtxb->packets);
dtx_packet_free(dtxp);
@ -3765,7 +3765,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 %ld)",
ts, dtxb->head_ts, ts_diff);
dtxp = NULL;
}


+ 1
- 1
lib/bufferpool.h View File

@ -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)


+ 1
- 1
recording-daemon/notify.c View File

@ -212,7 +212,7 @@ static void *notify_timer(void *p) {
gettimeofday(&now, NULL);
if (now.tv_sec < first->retry_time) {
ilog(LOG_DEBUG, "Sleeping until next scheduled HTTP notification retry in %lu seconds",
(unsigned long) first->retry_time - now.tv_sec);
(unsigned long) (first->retry_time - now.tv_sec));
struct timespec ts = {.tv_sec = first->retry_time, .tv_nsec = 0};
pthread_cond_timedwait(&timer_cond, &timer_lock, &ts);
continue;


Loading…
Cancel
Save