shithub: libopusenc

Download patch

ref: 6e3f7008a4243e60ceef016bfa37f9702c1c0aa5
parent: 664127e3af10c59d5149237704cbb0c4ab62a65d
author: Jean-Marc Valin <jmvalin@jmvalin.ca>
date: Fri May 5 00:07:31 EDT 2017

split pages seem to work

--- a/src/ogg_packer.c
+++ b/src/ogg_packer.c
@@ -163,7 +163,7 @@
 
   oggp->buf_size = MAX_PAGE_SIZE;
   oggp->lacing_size = 256;
-  oggp->pages_size = 10;
+  oggp->pages_size = 32;
 
   oggp->alloc_buf = malloc(oggp->buf_size + MAX_HEADER_SIZE);
   oggp->lacing = malloc(oggp->lacing_size);
@@ -386,7 +386,7 @@
   *page = ptr;
   *bytes = len;
   oggp->pages_fill--;
-  memmove(&oggp->pages[0], &oggp->pages[1], oggp->pages_fill);
+  memmove(&oggp->pages[0], &oggp->pages[1], oggp->pages_fill*sizeof(oggp_page));
   return 1;
 }