Commit 0660a6d8 authored by conrad's avatar conrad

remove some compile warnings in examples


git-svn-id: http://svn.annodex.net/liboggz/trunk@1347 8158c8cd-e7e1-0310-9fa4-c5954c97daef
parent 66a19dfa
......@@ -51,7 +51,7 @@ static int
read_page (OGGZ * oggz, const ogg_page * og, long serialno, void * user_data)
{
OggzTable * tracks = (OggzTable *)user_data;
long pageno = ogg_page_pageno(og);
long pageno = ogg_page_pageno((ogg_page *)og);
long *data = (long *)oggz_table_lookup(tracks, serialno);
if(data == NULL) {
data = malloc(sizeof(long));
......@@ -66,7 +66,7 @@ static int
write_page (OGGZ * oggz, const ogg_page * og, long serialno, void * user_data)
{
OggzTable * tracks = (OggzTable *)user_data;
long pageno = ogg_page_pageno(og);
long pageno = ogg_page_pageno((ogg_page *)og);
long *data = (long *)oggz_table_lookup(tracks, serialno);
if(data == NULL) {
......@@ -82,7 +82,7 @@ write_page (OGGZ * oggz, const ogg_page * og, long serialno, void * user_data)
header_type |= 0x4;
og->header[5] = header_type;
ogg_page_checksum_set(og);
ogg_page_checksum_set((ogg_page *)og);
}
}
......
......@@ -35,8 +35,11 @@
#include <oggz/oggz.h>
#define ID_WRITE_DIRECT
/* define USE_FLUSH_NEXT */
#ifdef USE_FLUSH_NEXT
static int flush_next = 0;
#endif
static int
read_packet (OGGZ * oggz, ogg_packet * op, long serialno, void * user_data)
......@@ -45,7 +48,7 @@ read_packet (OGGZ * oggz, ogg_packet * op, long serialno, void * user_data)
int flush;
int ret;
#if 0
#ifdef USE_FLUSH_NEXT
flush = flush_next;
if (op->granulepos == -1) {
flush_next = 0;
......@@ -72,8 +75,10 @@ main (int argc, char ** argv)
{
char * infilename, * outfilename;
OGGZ * reader, * writer;
#ifndef ID_WRITE_DIRECT
FILE * outfile;
unsigned char buf[1024];
#endif
long n;
if (argc < 3) {
......
......@@ -47,12 +47,12 @@ read_packet (OGGZ * oggz, ogg_packet * op, long serialno, void * user_data)
#endif
if (op->b_o_s) {
printf ("%010ld: [%ld] BOS %8s\n", serialno, op->granulepos, op->packet);
printf ("%010ld: [%lld] BOS %8s\n", serialno, op->granulepos, op->packet);
}
if (op->e_o_s) {
got_an_eos = 1;
printf ("%010ld: [%ld] EOS\n", serialno, op->granulepos);
printf ("%010ld: [%lld] EOS\n", serialno, op->granulepos);
}
return 0;
......
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