Browse Source

Fix format string warnings when compiling on 64 bit machine.

Georgi Chorbadzhiyski 12 years ago
parent
commit
3d6e5cf75f
1 changed files with 9 additions and 5 deletions
  1. 9
    5
      pes.c

+ 9
- 5
pes.c View File

10
 #include <netdb.h>
10
 #include <netdb.h>
11
 #include <stdlib.h>
11
 #include <stdlib.h>
12
 #include <string.h>
12
 #include <string.h>
13
+#include <inttypes.h>
13
 
14
 
14
 #include "tsfuncs.h"
15
 #include "tsfuncs.h"
15
 
16
 
510
 		pes->pes_extension_flag	? "PES_Ext "	: ""
511
 		pes->pes_extension_flag	? "PES_Ext "	: ""
511
 	);
512
 	);
512
 	if (pes->PTS_flag && pes->have_pts)
513
 	if (pes->PTS_flag && pes->have_pts)
513
-		ts_LOGf("  * PTS        : %llu (%llu ms) (%llu.%04llu sec)\n",
514
+		ts_LOGf("  * PTS        : %"PRIu64" (%"PRIu64" ms) (%"PRIu64".%04"PRIu64" sec)\n",
514
 			pes->PTS,
515
 			pes->PTS,
515
 			pes->PTS / 90,
516
 			pes->PTS / 90,
516
 			pes->PTS / 90000, (pes->PTS % 90000) / 9
517
 			pes->PTS / 90000, (pes->PTS % 90000) / 9
517
 		);
518
 		);
518
 	if (pes->DTS_flag && pes->have_dts)
519
 	if (pes->DTS_flag && pes->have_dts)
519
-		ts_LOGf("  * DTS        : %llu (%llu ms) (%llu.%04llu sec)\n",
520
+		ts_LOGf("  * DTS        : %"PRIu64" (%"PRIu64" ms) (%"PRIu64".%04"PRIu64" sec)\n",
520
 			pes->DTS,
521
 			pes->DTS,
521
 			pes->DTS / 90,
522
 			pes->DTS / 90,
522
 			pes->DTS / 90000, (pes->DTS % 90000) / 9
523
 			pes->DTS / 90000, (pes->DTS % 90000) / 9
523
 		);
524
 		);
524
 	if (pes->ESCR_flag)
525
 	if (pes->ESCR_flag)
525
-		ts_LOGf("  * ESCR       : %llu\n", pes->ESCR);
526
+		ts_LOGf("  * ESCR       : %"PRIu64"\n", pes->ESCR);
526
 	if (pes->ES_rate_flag)
527
 	if (pes->ES_rate_flag)
527
 		ts_LOGf("  * ES_rate    : %lu\n" , (unsigned long)pes->ES_rate * 50); // In units of 50 bytes
528
 		ts_LOGf("  * ES_rate    : %lu\n" , (unsigned long)pes->ES_rate * 50); // In units of 50 bytes
528
 
529
 
537
 		);
538
 		);
538
 	}
539
 	}
539
 
540
 
540
-	if (pes->pes_private_data_flag)
541
-		ts_LOGf("  * PES priv_data : 0x%08llx%08llx\n", pes->pes_private_data_1, pes->pes_private_data_2);
541
+	if (pes->pes_private_data_flag) {
542
+		ts_LOGf("  * PES priv_data : 0x%08llx%08llx\n",
543
+			(unsigned long long)pes->pes_private_data_1,
544
+			(unsigned long long)pes->pes_private_data_2);
545
+	}
542
 
546
 
543
 	if (pes->pack_header_field_flag) {
547
 	if (pes->pack_header_field_flag) {
544
 		ts_LOGf("  * Pack_header ... \n");
548
 		ts_LOGf("  * Pack_header ... \n");

Loading…
Cancel
Save