Commit 2fe19562 authored by conrad's avatar conrad
Browse files

print serialno as unsigned throughout


git-svn-id: http://svn.annodex.net/liboggz/trunk@3811 8158c8cd-e7e1-0310-9fa4-c5954c97daef
parent c5bad949
......@@ -50,7 +50,7 @@ read_comments (OGGZ * oggz, long serialno)
content_type = oggz_stream_get_content_type (oggz, serialno);
printf ("%s: serial %010ld\n\n", content_type, serialno);
printf ("%s: serial %010lu\n\n", content_type, serialno);
vendor = oggz_comment_get_vendor (oggz, serialno);
if (vendor) printf (" Vendor: %s\r\n", vendor);
......
......@@ -66,7 +66,7 @@ read_packet (OGGZ * oggz, ogg_packet * op, long serialno, void * user_data)
granuleshift = oggz_get_granuleshift (oggz, serialno);
printf ("%010ld: op->granulepos: ", serialno);
printf ("%010lu: op->granulepos: ", serialno);
print_granulepos (op->granulepos, granuleshift);
printf (" oggz_tell_granulepos(): ");
print_granulepos (oggz_tell_granulepos (oggz), granuleshift);
......
......@@ -49,18 +49,18 @@ read_packet (OGGZ * oggz, ogg_packet * op, long serialno, void * user_data)
{
#if 0
if (got_an_eos) {
printf ("[%010ld]\t%ld bytes\tgranulepos %ld\n", serialno, op->bytes,
printf ("[%010lu]\t%ld bytes\tgranulepos %ld\n", serialno, op->bytes,
(long)op->granulepos);
}
#endif
if (op->b_o_s) {
printf ("%010ld: [%" PRId64 "] BOS %8s\n", serialno, op->granulepos, op->packet);
printf ("%010lu: [%" PRId64 "] BOS %8s\n", serialno, op->granulepos, op->packet);
}
if (op->e_o_s) {
got_an_eos = 1;
printf ("%010ld: [%" PRId64 "] EOS\n", serialno, op->granulepos);
printf ("%010lu: [%" PRId64 "] EOS\n", serialno, op->granulepos);
}
return 0;
......
......@@ -58,7 +58,7 @@ oggz_metric_dirac (OGGZ * oggz, long serialno,
units = dt * stream->granulerate_d / stream->granulerate_n;
#ifdef DEBUG
printf ("oggz_..._granuleshift: serialno %010ld Got frame or field %lld (%lld + %lld): %lld units\n",
printf ("oggz_..._granuleshift: serialno %010lu Got frame or field %lld (%lld + %lld): %lld units\n",
serialno, dt, iframe, pframe, units);
#endif
......@@ -83,7 +83,7 @@ oggz_metric_default_granuleshift (OGGZ * oggz, long serialno,
units = granulepos * stream->granulerate_d / stream->granulerate_n;
#ifdef DEBUG
printf ("oggz_..._granuleshift: serialno %010ld Got frame %lld (%lld + %lld): %lld units\n",
printf ("oggz_..._granuleshift: serialno %010lu Got frame %lld (%lld + %lld): %lld units\n",
serialno, granulepos, iframe, pframe, units);
#endif
......
......@@ -407,7 +407,7 @@ auto_fisbone (OGGZ * oggz, long serialno, unsigned char * data, long length, voi
granuleshift = (int)header[48];
#ifdef DEBUG
printf ("Got fisbone granulerate %lld/%lld, granuleshift %d for serialno %010ld\n",
printf ("Got fisbone granulerate %lld/%lld, granuleshift %d for serialno %010lu\n",
granule_rate_numerator, granule_rate_denominator, granuleshift,
fisbone_serialno);
#endif
......
......@@ -227,13 +227,13 @@ oggz_write_feed (OGGZ * oggz, ogg_packet * op, long serialno, int flush,
* ie. that it fits within 32 bits and does not equal the special value -1 */
if ((long)((ogg_int32_t)serialno) != serialno || serialno == -1) {
#ifdef DEBUG
printf ("oggz_write_feed: serialno %010ld\n", serialno);
printf ("oggz_write_feed: serialno %010lu\n", serialno);
#endif
return OGGZ_ERR_BAD_SERIALNO;
}
#ifdef DEBUG
printf ("oggz_write_feed: (%010ld) FLUSH: %d\n", serialno, flush);
printf ("oggz_write_feed: (%010lu) FLUSH: %d\n", serialno, flush);
#endif
/* Cache strict, prefix, suffix */
......
......@@ -104,7 +104,7 @@ read_packet (OGGZ * oggz, ogg_packet * op, long serialno, void * user_data)
if (iter > MAX_ITER) return 1;
#ifdef DEBUG
printf ("%08" PRI_OGGZ_OFF_T "x: serialno %010ld, "
printf ("%08" PRI_OGGZ_OFF_T "x: serialno %010lu, "
"granulepos %" PRId64 ", packetno %" PRId64,
oggz_tell (oggz), serialno, op->granulepos, op->packetno);
......
......@@ -86,7 +86,7 @@ read_packet (OGGZ * oggz, ogg_packet * op, long serialno, void * user_data)
static long e_o_s = 0;
#ifdef DEBUG
printf ("%08" PRI_OGGZ_OFF_T "x: serialno %010ld, "
printf ("%08" PRI_OGGZ_OFF_T "x: serialno %010lu, "
"granulepos %" PRId64 ", packetno %" PRId64,
oggz_tell (oggz), serialno, op->granulepos, op->packetno);
......
......@@ -84,7 +84,7 @@ read_packet (OGGZ * oggz, ogg_packet * op, long serialno, void * user_data)
static long e_o_s = 0;
#ifdef DEBUG
printf ("%08" PRI_OGGZ_OFF_T "x: serialno %010ld, "
printf ("%08" PRI_OGGZ_OFF_T "x: serialno %010lu, "
"granulepos %" PRId64 ", packetno %" PRId64,
oggz_tell (oggz), serialno, op->granulepos, op->packetno);
......
......@@ -113,7 +113,7 @@ read_packet (OGGZ * oggz, ogg_packet * op, long serialno, void * user_data)
static long e_o_s = 0;
#ifdef DEBUG
printf ("%08" PRI_OGGZ_OFF_T "x: serialno %010ld, "
printf ("%08" PRI_OGGZ_OFF_T "x: serialno %010lu, "
"granulepos %" PRId64 ", packetno %" PRId64,
oggz_tell (oggz), serialno, op->granulepos, op->packetno);
......
......@@ -88,7 +88,7 @@ read_packet (OGGZ * oggz, ogg_packet * op, long serialno, void * user_data)
static long e_o_s = 0;
#ifdef DEBUG
printf ("%08" PRI_OGGZ_OFF_T "x: serialno %010ld, "
printf ("%08" PRI_OGGZ_OFF_T "x: serialno %010lu, "
"granulepos %" PRId64 ", packetno %" PRId64,
oggz_tell (oggz), serialno, op->granulepos, op->packetno);
......
......@@ -102,7 +102,7 @@ read_packet (OGGZ * oggz, ogg_packet * op, long serialno, void * user_data)
newpage = 0;
#ifdef DEBUG
printf ("%08" PRI_OGGZ_OFF_T "x: serialno %010ld, "
printf ("%08" PRI_OGGZ_OFF_T "x: serialno %010lu, "
"granulepos %" PRId64 ", packetno %" PRId64,
oggz_tell (oggz), serialno, op->granulepos, op->packetno);
......
......@@ -84,7 +84,7 @@ read_packet (OGGZ * oggz, ogg_packet * op, long serialno, void * user_data)
static long e_o_s = 0;
#ifdef DEBUG
printf ("%08" PRI_OGGZ_OFF_T "x: serialno %010ld, "
printf ("%08" PRI_OGGZ_OFF_T "x: serialno %010lu, "
"granulepos %" PRId64 ", packetno %" PRId64,
oggz_tell (oggz), serialno, op->granulepos, op->packetno);
......
......@@ -77,7 +77,7 @@ read_packet (OGGZ * oggz, ogg_packet * op, long serialno, void * user_data)
static long e_o_s = 0;
#ifdef DEBUG
printf ("%08" PRI_OGGZ_OFF_T "x: serialno %010ld, "
printf ("%08" PRI_OGGZ_OFF_T "x: serialno %010lu, "
"granulepos %" PRId64 ", packetno %" PRId64,
oggz_tell (oggz), serialno, op->granulepos, op->packetno);
......
......@@ -86,7 +86,7 @@ read_packet (OGGZ * oggz, ogg_packet * op, long serialno, void * user_data)
static long e_o_s = 0;
#ifdef DEBUG
printf ("%08" PRI_OGGZ_OFF_T "x: serialno %010ld, "
printf ("%08" PRI_OGGZ_OFF_T "x: serialno %010lu, "
"granulepos %" PRId64 ", packetno %" PRId64,
oggz_tell (oggz), serialno, op->granulepos, op->packetno);
......
......@@ -84,7 +84,7 @@ read_packet (OGGZ * oggz, ogg_packet * op, long serialno, void * user_data)
static long e_o_s = 0;
#ifdef DEBUG
printf ("%08" PRI_OGGZ_OFF_T "x: serialno %010ld, "
printf ("%08" PRI_OGGZ_OFF_T "x: serialno %010lu, "
"granulepos %" PRId64 ", packetno %" PRId64,
oggz_tell (oggz), serialno, op->granulepos, op->packetno);
......
......@@ -207,7 +207,7 @@ read_page (OGGZ * oggz, const ogg_page * og, long serialno, void * user_data)
oggz_get_granulerate (oggz, serialno, &gr_n, &gr_d);
ort->delta = (ord->base_units * gr_n) / (gr_d);
#ifdef DEBUG
fprintf (stderr, "%010ld: DELTA %lld (gr: %lld/%lld)\n",
fprintf (stderr, "%010lu: DELTA %lld (gr: %lld/%lld)\n",
serialno, ort->delta, gr_n, gr_d);
#endif
}
......@@ -220,7 +220,7 @@ read_page (OGGZ * oggz, const ogg_page * og, long serialno, void * user_data)
ort->nr_packets += ogg_page_packets ((ogg_page *)og);
#ifdef DEBUG
fprintf (stderr, "%010ld: %d packets, gp %lld\n",
fprintf (stderr, "%010lu: %d packets, gp %lld\n",
serialno, ort->nr_packets, ogg_page_granulepos ((ogg_page *)og));
#endif
......
......@@ -189,7 +189,7 @@ read_bos (OGGZ * oggz, const ogg_page * og, long serialno, void * user_data)
* http://lists.xiph.org/pipermail/ogg-dev/2008-November/001277.html
*/
if (ocdata->do_all) {
fprintf (stderr, "oggz-comment: Warning: Ignoring Dirac track, serialno %010ld\n",
fprintf (stderr, "oggz-comment: Warning: Ignoring Dirac track, serialno %010lu\n",
serialno);
} else {
fail_dirac (ocdata);
......@@ -354,9 +354,9 @@ read_comments(OGGZ *oggz, ogg_packet *op, long serialno, void *user_data)
if (filter_stream_p (ocdata, serialno) && op->packetno == 1) {
codec_name = oggz_stream_get_content_type(oggz, serialno);
if (codec_name) {
printf ("%s: serialno %010ld\n", codec_name, serialno);
printf ("%s: serialno %010lu\n", codec_name, serialno);
} else {
printf ("???: serialno %010ld\n", serialno);
printf ("???: serialno %010lu\n", serialno);
}
printf("\tVendor: %s\n", oggz_comment_get_vendor(oggz, serialno));
......
......@@ -253,7 +253,7 @@ read_packet (OGGZ * oggz, ogg_packet * op, long serialno, void * user_data)
}
}
fprintf (outfile, ": serialno %010ld, ",
fprintf (outfile, ": serialno %010lu, ",
oddata->hide_serialno ? -1 : serialno);
if (oddata->hide_granulepos) {
......@@ -340,7 +340,7 @@ revert_packet (OGGZ * oggz, ogg_packet * op, long serialno, int flush)
int ret;
#ifdef DEBUG
printf ("feeding packet (%010ld) %ld bytes %s, %s\n",
printf ("feeding packet (%010lu) %ld bytes %s, %s\n",
current_serialno, op->bytes,
op->b_o_s ? "bos" : "not bos",
op->e_o_s ? "eos" : "not eos");
......
......@@ -259,7 +259,7 @@ ot_fisbone_print(OI_Info * info, OI_TrackInfo *oit) {
if (oit->has_fisbone) {
printf("\n\tExtra information from Ogg Skeleton track:\n");
/*printf("\tserialno: %010d\n", oit->fbInfo.serial_no);*/
/*printf("\tserialno: %010u\n", oit->fbInfo.serial_no);*/
printf("\tNumber of header packets: %d\n", oit->fbInfo.nr_header_packet);
printf("\tGranule rate: %.2f\n", (double)oit->fbInfo.granule_rate_n/oit->fbInfo.granule_rate_d);
printf("\tGranule shift: %d\n", (int)oit->fbInfo.granule_shift);
......@@ -288,9 +288,9 @@ static void
oit_print (OI_Info * info, OI_TrackInfo * oit, long serialno)
{
if (oit->codec_name) {
printf ("\n%s: serialno %010ld\n", oit->codec_name, serialno);
printf ("\n%s: serialno %010lu\n", oit->codec_name, serialno);
} else {
printf ("\n???: serialno %010ld\n", serialno);
printf ("\n???: serialno %010lu\n", serialno);
}
printf ("\t%ld packets in %ld pages, %.1f packets/page, %.3f%% Ogg overhead\n",
oit->packets.count, oit->pages.count,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment