Browse Source

Fix format strings on 64 bit machine.

Georgi Chorbadzhiyski 9 years ago
parent
commit
6aae193a13
1 changed files with 3 additions and 2 deletions
  1. 3
    2
      output_write.c

+ 3
- 2
output_write.c View File

@@ -21,6 +21,7 @@
21 21
 #include <sys/time.h>
22 22
 #include <errno.h>
23 23
 #include <math.h>
24
+#include <inttypes.h>
24 25
 
25 26
 #include "libfuncs/io.h"
26 27
 #include "libfuncs/log.h"
@@ -75,7 +76,7 @@ void ts_frame_process(CONFIG *conf, OUTPUT *o, uint8_t *data) {
75 76
 					if (conf->debug) {
76 77
 						uint64_t ts_rate = (double)(((bytes - old_bytes) * 8) * 27000000) / (pcr - old_org_pcr);
77 78
 						uint64_t ts_rate_new = (double)(((bytes - old_bytes) * 8) * 27000000) / (new_pcr - old_pcr);
78
-						LOGf("PCR[%03x]: old:%14llu new:%14llu pcr_diff:%8lld ts_rate:%9llu ts_rate_new:%9llu diff:%9lld | passed:%llu\n",
79
+						LOGf("PCR[%03x]: old:%14" PRIu64 " new:%14" PRIu64 " pcr_diff:%8" PRId64 " ts_rate:%9" PRIu64 " ts_rate_new:%9" PRIu64 " diff:%9" PRId64 " | passed:%" PRIu64 "\n",
79 80
 							pid,
80 81
 							pcr,
81 82
 							new_pcr,
@@ -147,7 +148,7 @@ void * output_handle_write(void *_config) {
147 148
 			double opadding = ((double)o->padding_period / o->traffic_period) * 100;
148 149
 
149 150
 			if (!conf->quiet) {
150
-				LOGf("STAT  : Pad:%6.2f%% Traf:%5.2f Mbps | %8.2f | %7llu\n",
151
+				LOGf("STAT  : Pad:%6.2f%% Traf:%5.2f Mbps | %8.2f | %7" PRIu64 "\n",
151 152
 					opadding,
152 153
 					out_mbps,
153 154
 					out_kbps,

Loading…
Cancel
Save