diff options
author | Timothy B. Terriberry <tterribe@xiph.org> | 2017-06-16 14:12:12 -0700 |
---|---|---|
committer | Timothy B. Terriberry <tterribe@xiph.org> | 2017-06-16 15:01:08 -0700 |
commit | 14920bae036a56166b3289afd18d67739f015495 (patch) | |
tree | 931ce57f579cae23899551773abdef2939d4d2a1 /src | |
parent | a2df21b398286f21c6004247f7d8b1a9d87a6e03 (diff) | |
download | ogg-git-14920bae036a56166b3289afd18d67739f015495.tar.gz |
Make false continued packet handling consistent
A false continued packet occurs if the previous page ended at the
end of a packet, with no sequence number gap and no continued data
on that page, while the current page has the continued packet flag
set.
Previously, if you drained all of the buffered packet data by
repeatedly calling ogg_stream_packetout() after submitting the
previous page but before submitting the current page, libogg would
discard the continued data at the beggining of the current page.
However, if you left the previous page's data in the buffer, then
libogg would happily return the continued data at the start of the
current page as a separate packet when you eventually did call
ogg_stream_packetout().
This patch makes libogg consistently discard this data.
Diffstat (limited to 'src')
-rw-r--r-- | src/framing.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/framing.c b/src/framing.c index 506cf8a..6f63ab2 100644 --- a/src/framing.c +++ b/src/framing.c @@ -875,6 +875,7 @@ int ogg_stream_pagein(ogg_stream_state *os, ogg_page *og){ some segments */ if(continued){ if(os->lacing_fill<1 || + (os->lacing_vals[os->lacing_fill-1]&0xff)<255 || os->lacing_vals[os->lacing_fill-1]==0x400){ bos=0; for(;segptr<segments;segptr++){ |