[xiph-commits] r3788 - liboggz/trunk/src/liboggz
giles at svn.annodex.net
giles at svn.annodex.net
Mon Nov 17 11:59:20 PST 2008
Author: giles
Date: 2008-11-17 11:59:19 -0800 (Mon, 17 Nov 2008)
New Revision: 3788
Modified:
liboggz/trunk/src/liboggz/oggz_read.c
liboggz/trunk/src/liboggz/oggz_write.c
Log:
Clean up some trailing whitespace.
Modified: liboggz/trunk/src/liboggz/oggz_read.c
===================================================================
--- liboggz/trunk/src/liboggz/oggz_read.c 2008-11-17 18:59:45 UTC (rev 3787)
+++ liboggz/trunk/src/liboggz/oggz_read.c 2008-11-17 19:59:19 UTC (rev 3788)
@@ -250,8 +250,8 @@
} OggzBufferedPacket;
OggzBufferedPacket *
-oggz_read_new_pbuffer_entry(OGGZ *oggz, ogg_packet *packet,
- ogg_int64_t granulepos, long serialno, oggz_stream_t * stream,
+oggz_read_new_pbuffer_entry(OGGZ *oggz, ogg_packet *packet,
+ ogg_int64_t granulepos, long serialno, oggz_stream_t * stream,
OggzReader *reader) {
OggzBufferedPacket *p = malloc(sizeof(OggzBufferedPacket));
@@ -270,7 +270,7 @@
void
oggz_read_free_pbuffer_entry(OggzBufferedPacket *p) {
-
+
free(p->packet.packet);
free(p);
@@ -283,10 +283,10 @@
if (p->calced_granulepos == -1 && p->stream->last_granulepos != -1) {
int content = oggz_stream_get_content(p->oggz, p->serialno);
- p->calced_granulepos =
+ p->calced_granulepos =
oggz_auto_calculate_gp_backwards(content, p->stream->last_granulepos,
p->stream, &(p->packet), p->stream->last_packet);
-
+
p->stream->last_granulepos = p->calced_granulepos;
p->stream->last_packet = &(p->packet);
}
@@ -315,10 +315,10 @@
oggz_get_unit (p->oggz, p->serialno, p->calced_granulepos);
if (p->stream->read_packet) {
- p->stream->read_packet(p->oggz, &(p->packet), p->serialno,
+ p->stream->read_packet(p->oggz, &(p->packet), p->serialno,
p->stream->read_user_data);
} else if (p->reader->read_packet) {
- p->reader->read_packet(p->oggz, &(p->packet), p->serialno,
+ p->reader->read_packet(p->oggz, &(p->packet), p->serialno,
p->reader->read_user_data);
}
@@ -404,29 +404,29 @@
int content;
stream->packetno++;
-
+
/* got a packet. process it */
granulepos = op->granulepos;
content = oggz_stream_get_content(oggz, serialno);
-
+
/*
* if we have no metrics for this stream yet, then generate them
- */
- if
+ */
+ if
(
- (!stream->metric || (content == OGGZ_CONTENT_SKELETON))
- &&
+ (!stream->metric || (content == OGGZ_CONTENT_SKELETON))
+ &&
(oggz->flags & OGGZ_AUTO)
- )
+ )
{
oggz_auto_read_bos_packet (oggz, op, serialno, NULL);
}
/* attempt to determine granulepos for this packet */
if (oggz->flags & OGGZ_AUTO) {
- reader->current_granulepos =
- oggz_auto_calculate_granulepos (content, granulepos, stream, op);
+ reader->current_granulepos =
+ oggz_auto_calculate_granulepos (content, granulepos, stream, op);
/* make sure that we accept any "real" gaps in the granulepos
*/
if (granulepos != -1 && reader->current_granulepos < granulepos) {
@@ -436,12 +436,12 @@
reader->current_granulepos = granulepos;
}
stream->last_granulepos = reader->current_granulepos;
-
+
/* set unit on last packet of page */
- if
+ if
(
(oggz->metric || stream->metric) && reader->current_granulepos != -1
- )
+ )
{
reader->current_unit =
oggz_get_unit (oggz, serialno, reader->current_granulepos);
@@ -450,15 +450,15 @@
if (stream->packetno == 1) {
oggz_auto_read_comments (oggz, stream, serialno, op);
}
-
+
if (oggz->flags & OGGZ_AUTO) {
-
+
/*
- * while we are getting invalid granulepos values, store the
+ * while we are getting invalid granulepos values, store the
* incoming packets in a dlist */
if (reader->current_granulepos == -1) {
OggzBufferedPacket *p = oggz_read_new_pbuffer_entry(
- oggz, &packet, reader->current_granulepos,
+ oggz, &packet, reader->current_granulepos,
serialno, stream, reader);
oggz_dlist_append(oggz->packet_buffer, p);
@@ -476,13 +476,13 @@
oggz_dlist_deliter(oggz->packet_buffer, oggz_read_deliver_packet);
/*
- * fix up the stream granulepos
+ * fix up the stream granulepos
*/
stream->last_granulepos = gp_stored;
if (!oggz_dlist_is_empty(oggz->packet_buffer)) {
OggzBufferedPacket *p = oggz_read_new_pbuffer_entry(
- oggz, &packet, reader->current_granulepos,
+ oggz, &packet, reader->current_granulepos,
serialno, stream, reader);
oggz_dlist_append(oggz->packet_buffer, p);
@@ -542,7 +542,7 @@
*/
oggz_auto_identify_page (oggz, &og, serialno);
}
-
+
os = &stream->ogg_stream;
{
@@ -628,10 +628,10 @@
if (bytes_read > 0) {
ogg_sync_wrote (&reader->ogg_sync, bytes_read);
-
+
remaining -= bytes_read;
nread += bytes_read;
-
+
cb_ret = oggz_read_sync (oggz);
}
}
Modified: liboggz/trunk/src/liboggz/oggz_write.c
===================================================================
--- liboggz/trunk/src/liboggz/oggz_write.c 2008-11-17 18:59:45 UTC (rev 3787)
+++ liboggz/trunk/src/liboggz/oggz_write.c 2008-11-17 19:59:19 UTC (rev 3788)
@@ -656,7 +656,7 @@
#ifdef DEBUG
printf("oggz_writer_make_packet: cb_ret is %d\n", cb_ret);
#endif
-
+
if (cb_ret == 0 && next_zpacket == NULL) return OGGZ_WRITE_EMPTY;
return cb_ret;
@@ -670,7 +670,7 @@
int active = 1, cb_ret = 0;
if (oggz == NULL) return OGGZ_ERR_BAD_OGGZ;
-
+
writer = &oggz->x.writer;
if (!(oggz->flags & OGGZ_WRITE)) {
@@ -822,7 +822,7 @@
* if we're out of packets because we're at the end of the file,
* we can't finish just yet. Instead we need to force a page flush,
* and write the page out. So we set flushing and no_more_packets to
- * 1. This causes oggz_page_init to flush the page, then we
+ * 1. This causes oggz_page_init to flush the page, then we
* will switch the state to OGGZ_WRITING_PAGES, which will trigger
* the writing code below.
*/
More information about the commits
mailing list