Commit 2fe19562 authored by conrad's avatar conrad

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,
......
......@@ -275,7 +275,7 @@ oggz_merge (OMData * omdata, FILE * outfile)
if (omdata->verbose) {
ot_fprint_time (stdout, (double)units/1000);
printf (": Got index %d serialno %010d %" PRId64 " units: ",
printf (": Got index %d serialno %010u %" PRId64 " units: ",
i, ogg_page_serialno ((ogg_page *)input->og), units);
}
......
......@@ -274,7 +274,7 @@ oggz_sort (OSData * osdata, FILE * outfile)
if (osdata->verbose) {
ot_fprint_time (stdout, (double)units/1000);
printf (": Got index %d serialno %010d %lld units: ",
printf (": Got index %d serialno %010u %lld units: ",
i, ogg_page_serialno ((ogg_page *)input->og), (long long) units);
}
......
......@@ -223,7 +223,7 @@ ovdata_clear (OVData * ovdata)
for (i = 0; i < nr_missing_eos; i++) {
log_error ();
oggz_table_nth (ovdata->missing_eos, i, &serialno);
fprintf (stderr, "serialno %010ld: missing *** eos\n", serialno);
fprintf (stderr, "serialno %010lu: missing *** eos\n", serialno);
}
}
......@@ -257,7 +257,7 @@ read_page (OGGZ * oggz, const ogg_page * og, long serialno, void * user_data)
ovdata->theora_count++;
if (ovdata->audio_count > 0) {
log_error ();
fprintf (stderr, "serialno %010ld: Theora video bos page after audio bos page\n", serialno);
fprintf (stderr, "serialno %010lu: Theora video bos page after audio bos page\n", serialno);
}
break;
case OGGZ_CONTENT_VORBIS:
......@@ -279,7 +279,7 @@ read_page (OGGZ * oggz, const ogg_page * og, long serialno, void * user_data)
if (!suffix) {
if (oggz_table_lookup (ovdata->missing_eos, serialno) == NULL) {
ret = log_error ();
fprintf (stderr, "serialno %010ld: missing *** bos\n", serialno);
fprintf (stderr, "serialno %010lu: missing *** bos\n", serialno);
}
packetno = (int)oggz_table_lookup (ovdata->packetno, serialno);
......@@ -290,16 +290,16 @@ read_page (OGGZ * oggz, const ogg_page * og, long serialno, void * user_data)
oggz_table_insert (ovdata->packetno, serialno, (void *)packetno);
if (packetno == headers && gpos != 0) {
ret = log_error ();
fprintf (stderr, "serialno %010ld: Terminal header page has non-zero granulepos\n", serialno);
fprintf (stderr, "serialno %010lu: Terminal header page has non-zero granulepos\n", serialno);
} else if (packetno > headers) {
ret = log_error ();
fprintf (stderr, "serialno %010ld: Terminal header page contains non-header packet\n", serialno);
fprintf (stderr, "serialno %010lu: Terminal header page contains non-header packet\n", serialno);
}
} else if (packetno == headers) {
/* This is the next page after the page on which the last header finished */
if (ogg_page_continued (og)) {
ret = log_error ();
fprintf (stderr, "serialno %010ld: Terminal header page contains non-header segment\n", serialno);
fprintf (stderr, "serialno %010lu: Terminal header page contains non-header segment\n", serialno);
}
/* Mark packetno as greater than headers to avoid these checks for this serialno */
......@@ -313,13 +313,13 @@ read_page (OGGZ * oggz, const ogg_page * og, long serialno, void * user_data)
int removed = oggz_table_remove (ovdata->missing_eos, serialno);
if (!suffix && removed == -1) {
ret = log_error ();
fprintf (stderr, "serialno %010ld: *** eos marked but no bos\n",
fprintf (stderr, "serialno %010lu: *** eos marked but no bos\n",
serialno);
}
if (packets == 0) {
ret = log_error ();
fprintf (stderr, "serialno %010ld: *** eos marked on page with no completed packets\n",
fprintf (stderr, "serialno %010lu: *** eos marked on page with no completed packets\n",
serialno);
}
......@@ -331,7 +331,7 @@ read_page (OGGZ * oggz, const ogg_page * og, long serialno, void * user_data)
if(gpos != -1 && packets == 0) {
ret = log_error ();
fprintf (stderr, "serialno %010ld: granulepos %" PRId64 " on page with no completed packets, must be -1\n", serialno, gpos);
fprintf (stderr, "serialno %010lu: granulepos %" PRId64 " on page with no completed packets, must be -1\n", serialno, gpos);
}
return ret;
......@@ -350,7 +350,7 @@ read_packet (OGGZ * oggz, ogg_packet * op, long serialno, void * user_data)
if (timestamp < current_timestamp) {
ret = log_error();
ot_fprint_time (stderr, (double)timestamp/SUBSECONDS);
fprintf (stderr, ": serialno %010ld: Packet out of order (previous ",
fprintf (stderr, ": serialno %010lu: Packet out of order (previous ",
serialno);
ot_fprint_time (stderr, (double)current_timestamp/SUBSECONDS);
fprintf (stderr, ")\n");
......@@ -371,7 +371,7 @@ read_packet (OGGZ * oggz, ogg_packet * op, long serialno, void * user_data)
} else {
ot_fprint_time (stderr, (double)timestamp/SUBSECONDS);
}
fprintf (stderr, ": serialno %010ld: ", serialno);
fprintf (stderr, ": serialno %010lu: ", serialno);
for (i = 0; errors[i].error; i++) {
if (errors[i].error == feed_err) {
fprintf (stderr, "%s\n", errors[i].description);
......
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