ref: 90aad98fb1b999bf08d1bf7c698215b3bc77c5cf
parent: e30489084793942c2acd903f96e29b8a45bd14c6
author: Jean-Marc Valin <[email protected]>
date: Thu May 4 21:04:03 EDT 2017
more fixes
--- a/src/ogg_packer.c
+++ b/src/ogg_packer.c
@@ -287,6 +287,9 @@
If there is too much data for one page, all page continuations will be closed too. */
int oggp_flush_page(oggpacker *oggp) {
oggp_page *p;
+ if (oggp->lacing_fill == oggp->lacing_begin) {
+ return 1;
+ }
/* FIXME: Check we have a free page. */
/* FIXME: Check there is at least one packet. */
p = &oggp->pages[oggp->pages_fill++];
@@ -368,7 +371,7 @@
*bytes = len;
oggp->pages_fill--;
memmove(&oggp->pages[0], &oggp->pages[1], oggp->pages_fill);
- return 0;
+ return 1;
}
/** Creates a new (chained) stream. This closes all outstanding pages. These