diff options
author | Monty <xiphmont@xiph.org> | 2004-09-22 20:57:09 +0000 |
---|---|---|
committer | Monty <xiphmont@xiph.org> | 2004-09-22 20:57:09 +0000 |
commit | 408497846dd1f4f43d71d50d4ea0e4c46a7cfa8b (patch) | |
tree | de0d98df91b036b69bf28876b4cff740897d6bc3 /src | |
parent | f14f21ef8419dba45991c71c0187e48af184c20e (diff) | |
download | ogg-git-408497846dd1f4f43d71d50d4ea0e4c46a7cfa8b.tar.gz |
Fix for Josh Coalson's long-packet sync continuation bug. Passes all unit tests.
svn path=/trunk/ogg/; revision=7835
Diffstat (limited to 'src')
-rw-r--r-- | src/framing.c | 10 |
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; } |