Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions pcapreport.c
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,7 @@ static int digest_times(pcapreport_ctx_t * const ctx,
&payload, &payload_len);
if (rv)
{
fprint_msg(">%d> WARNING: TS packet %d [ packet %d @ %d.%d s ] cannot be split.\n",
fprint_msg(">%d> WARNING: TS packet %d [ packet %d @ %d.%06d s ] cannot be split.\n",
st->stream_no,
st->ts_counter, ctx->pkt_counter,
pcap_pkt_hdr->ts_sec, pcap_pkt_hdr->ts_usec);
Expand All @@ -659,7 +659,7 @@ static int digest_times(pcapreport_ctx_t * const ctx,

if (ctx->time_report)
{
fprint_msg(">%d> Found PCR %lld at %d.%d s \n", st->stream_no,
fprint_msg(">%d> Found PCR %lld at %d.%06d s \n", st->stream_no,
pcr, pcap_pkt_hdr->ts_sec, pcap_pkt_hdr->ts_usec);
}

Expand Down Expand Up @@ -714,7 +714,7 @@ static int digest_times(pcapreport_ctx_t * const ctx,
if (tsect->section_no != 0)
{
fprint_msg(">%d> Skew discontinuity! Skew = %lld (> %lld) at"
" ts = %d network = %d (PCR %lld Time %d.%d)\n",
" ts = %d network = %d (PCR %lld Time %d.%06d)\n",
st->stream_no,
skew, st->skew_discontinuity_threshold,
st->ts_counter, ctx->pkt_counter,
Expand Down Expand Up @@ -761,14 +761,13 @@ static int digest_times(pcapreport_ctx_t * const ctx,
int64_t rel_tim = t_pcr - tsect->time_first; // 90kHz
double skew_rate = (rel_tim == 0) ? 0.0 :
(double)skew / ((double)((double)rel_tim / (60*90000)));

fprint_msg(">%d> [ts %d net %d ] PCR %lld Time %d.%d [rel %d.%d] - skew = %lld (delta = %lld, rate = %.4g PTS/min) - jitter=%u\n",
fprint_msg(">%d> [ts %d net %d ] PCR %lld Time %d.%06d [rel %d.%06d] - skew = %lld (delta = %lld, rate = %.4g PTS/min) - jitter=%u\n",
st->stream_no,
st->ts_counter, ctx->pkt_counter,
pcr,
pcap_pkt_hdr->ts_sec, pcap_pkt_hdr->ts_usec,
(int)(rel_tim / (int64_t)1000000),
(int)rel_tim%1000000,
(int)(rel_tim / (int64_t)90000),
(int)((rel_tim * 1000000) / 90000) %1000000,
skew, pcr_time_offset - st->last_time_offset,
skew_rate, cur_jitter);
}
Expand Down Expand Up @@ -1803,7 +1802,7 @@ int main(int argc, char **argv)

if (ctx->verbose)
{
fprint_msg("pkt: Time = %d.%d orig_len = %d \n",
fprint_msg("pkt: Time = %d.%06d orig_len = %d \n",
rec_hdr.ts_sec, rec_hdr.ts_usec,
rec_hdr.orig_len);
}
Expand Down