summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMonty <xiphmont@xiph.org>2004-09-22 20:57:09 +0000
committerMonty <xiphmont@xiph.org>2004-09-22 20:57:09 +0000
commit348aa63a1f72c496ffdaa9363d666c6bb0e6b604 (patch)
treede0d98df91b036b69bf28876b4cff740897d6bc3 /src
parentcdd0eb8bd0bc23a13e3d10b71c1e9fef7f17e353 (diff)
downloadogg-348aa63a1f72c496ffdaa9363d666c6bb0e6b604.tar.gz
Fix for Josh Coalson's long-packet sync continuation bug. Passes all unit tests.
git-svn-id: http://svn.xiph.org/trunk/ogg@7835 0101bb08-14d6-0310-b084-bc0e0c8e3800
Diffstat (limited to 'src')
-rw-r--r--src/framing.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/framing.c b/src/framing.c
index 83cc0cb..8852d0c 100644
--- a/src/framing.c
+++ b/src/framing.c
@@ -732,10 +732,13 @@ int ogg_stream_pagein(ogg_stream_state *os, ogg_page *og){
os->lacing_vals[os->lacing_fill++]=0x400;
os->lacing_packet++;
}
+ }
- /* are we a 'continued packet' page? If so, we'll need to skip
- some segments */
- if(continued){
+ /* are we a 'continued packet' page? If so, we may need to skip
+ some segments */
+ if(continued){
+ if(os->lacing_fill<1 ||
+ os->lacing_vals[os->lacing_fill-1]==0x400){
bos=0;
for(;segptr<segments;segptr++){
int val=header[27+segptr];
@@ -1257,6 +1260,7 @@ void test_pack(const int *pl, const int **headers, int byteskip,
outptr+=og.body_len;
pageno++;
if(pageskip){
+ bosflag=1;
pageskip--;
deptr+=og.body_len;
}