Commit 0e4083f5 authored by shans's avatar shans

Getting everything to actually compile again



git-svn-id: http://svn.annodex.net/liboggz/trunk@3204 8158c8cd-e7e1-0310-9fa4-c5954c97daef
parent 38073f5e
......@@ -292,7 +292,7 @@ AM_CONDITIONAL(HAVE_OGG, [test "x$HAVE_OGG" = "xyes"])
dnl Add some useful warnings if we have gcc.
dnl changequote(,)dnl
if test "x$ac_cv_prog_gcc" = xyes ; then
CFLAGS="$CFLAGS -Wall -Wextra -g -std=gnu99 -Wdeclaration-after-statement"
CFLAGS="$CFLAGS -Wall -Wextra -g -std=gnu99 -Wdeclaration-after-statement -Wno-unused"
fi
dnl changequote([,])dnl
......
......@@ -848,7 +848,7 @@ const oggz_auto_contenttype_t oggz_auto_codec_ident[] = {
{"fLaC", 4, "Flac0", auto_flac0, auto_calc_flac},
{"\177FLAC", 4, "Flac", auto_flac, auto_calc_flac},
{"AnxData", 7, "AnxData", auto_anxdata, NULL},
{"", 0, "Unknown", NULL}
{"", 0, "Unknown", NULL, NULL}
};
int oggz_auto_identify (OGGZ *oggz, ogg_page *og, long serialno) {
......
......@@ -97,8 +97,8 @@ oggz_tell_raw (OGGZ * oggz)
*/
int
oggz_seek_reset_stream(void *data, void *arg) {
((oggz_stream_t *)data)->last_granulepos = (int)arg;
oggz_seek_reset_stream(void *data) {
((oggz_stream_t *)data)->last_granulepos = -1L;
return 0;
}
......@@ -118,7 +118,7 @@ oggz_seek_raw (OGGZ * oggz, oggz_off_t offset, int whence)
ogg_sync_reset (&reader->ogg_sync);
oggz_vector_foreach1(oggz->streams, oggz_seek_reset_stream, (void *)-1);
oggz_vector_foreach(oggz->streams, oggz_seek_reset_stream);
return offset_at;
}
......
......@@ -260,7 +260,6 @@ oggz_write_feed (OGGZ * oggz, ogg_packet * op, long serialno, int flush,
if (strict) {
if (op->bytes < 0) return OGGZ_ERR_BAD_BYTES;
if (!suffix && b_o_s != stream->b_o_s) return OGGZ_ERR_BAD_B_O_S;
if (op->granulepos != -1 && op->granulepos < stream->granulepos)
return OGGZ_ERR_BAD_GRANULEPOS;
......@@ -580,7 +579,7 @@ static long
oggz_writer_make_packet (OGGZ * oggz)
{
OggzWriter * writer = &oggz->x.writer;
oggz_writer_packet_t * zpacket, * next_zpacket;
oggz_writer_packet_t * zpacket, * next_zpacket = NULL;
int cb_ret = 0;
#ifdef DEBUG
......
......@@ -136,7 +136,7 @@ my_io_read (void * user_handle, void * buf, size_t n)
/* Mark that the read IO method was actually used */
read_called++;
len = MIN (n, bytes_generated - offset);
len = MIN ((int)n, bytes_generated - offset);
memcpy (buf, &data_buf[offset], len);
......
......@@ -134,7 +134,7 @@ my_io_read (void * user_handle, void * buf, size_t n)
/* Mark that the read IO method was actually used */
read_called++;
len = MIN (n, DATA_BUF_LEN - offset);
len = MIN ((int)n, DATA_BUF_LEN - offset);
memcpy (buf, &data_buf[offset], len);
offset += len;
......
......@@ -143,7 +143,7 @@ my_io_read (void * user_handle, void * buf, size_t n)
/* Mark that the read IO method was actually used */
read_called++;
len = MIN (n, offset_end - my_offset);
len = MIN ((int)n, offset_end - my_offset);
memcpy (buf, &data_buf[my_offset], len);
my_offset += len;
......
......@@ -144,7 +144,7 @@ my_io_write (void * user_handle, void * buf, size_t n)
/* Mark that the write IO method was actually used */
write_called++;
len = MIN (n, DATA_BUF_LEN - write_offset);
len = MIN ((int)n, DATA_BUF_LEN - write_offset);
memcpy (&data_buf[write_offset], buf, len);
write_offset += len;
......
......@@ -134,7 +134,7 @@ my_io_write (void * user_handle, void * buf, size_t n)
/* Mark that the write IO method was actually used */
write_called++;
len = MIN (n, DATA_BUF_LEN - offset);
len = MIN ((int)n, DATA_BUF_LEN - offset);
memcpy (&data_buf[offset], buf, len);
offset += len;
......
......@@ -205,7 +205,7 @@ static void
checked_fwrite (const void *data, size_t size, size_t count, FILE *stream)
{
int n = fwrite (data, size, count, stream);
if (n != count) {
if ((size_t)n != count) {
perror ("write failed");
exit (1);
}
......
......@@ -107,9 +107,11 @@ fishead_packet fishead_from_ogg(ogg_packet *op) {
fishead_packet fp;
/*
if (memcmp(op->packet, FISHEAD_IDENTIFIER, 8))
; /* invalid packet what do we do? */
; invalid packet what do we do?
*/
fp.version_major = *((ogg_uint16_t*)(op->packet+8)); /* version major */
fp.version_minor = *((ogg_uint16_t*)(op->packet+10)); /* version minor */
fp.ptime_n = *((ogg_int64_t*)(op->packet+12)); /* presentationtime numerator */
......@@ -126,8 +128,10 @@ fisbone_packet fisbone_from_ogg(ogg_packet *op) {
fisbone_packet fp;
/*
if (memcmp(op->packet, FISBONE_IDENTIFIER, 8))
; /* invalid value, what do we do? */
; invalid value, what do we do?
*/
fp.serial_no = *((ogg_uint32_t*)(op->packet+12)); /* serialno of the stream represented by this fisbone packet */
fp.nr_header_packet = *((ogg_uint32_t*)(op->packet+16)); /* number of header packets */
fp.granule_rate_n = *((ogg_int64_t*)(op->packet+20)); /* granulrate numerator */
......
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