From ff3e7260a06ccd0eeb473b7e16c6efcfc48ab6ed Mon Sep 17 00:00:00 2001 From: Monty Date: Thu, 24 May 2001 05:17:14 +0000 Subject: Decided to alter behavior of packetpeek slightly: packetpeek can report -1 indicating a hole in the data (not really an error). Previously, packetout would have to be called to clear the hole; now, the hole is cleared by packetpeek. That is, the change is that ogg_stream_packetpeek must be followed by a call to ogg_stream_packetout(state,NULL) to continue advancing forward only if packetpeek returned a packet. git-svn-id: http://svn.xiph.org/trunk/ogg@1454 0101bb08-14d6-0310-b084-bc0e0c8e3800 --- src/framing.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/framing.c b/src/framing.c index 4a344f8..128c98e 100644 --- a/src/framing.c +++ b/src/framing.c @@ -12,7 +12,7 @@ function: code raw [Vorbis] packets into framed OggSquish stream and decode Ogg streams back into raw packets - last mod: $Id: framing.c,v 1.12 2001/05/24 01:04:36 xiphmont Exp $ + last mod: $Id: framing.c,v 1.13 2001/05/24 05:17:14 xiphmont Exp $ note: The CRC code is directly derived from public domain code by Ross Williams (ross@guest.adelaide.edu.au). See docs/framing.html @@ -779,10 +779,8 @@ static int _packetout(ogg_stream_state *os,ogg_packet *op,int adv){ if(os->lacing_vals[ptr]&0x400){ /* we need to tell the codec there's a gap; it might need to handle previous packet dependencies. */ - if(adv){ - os->lacing_returned++; - os->packetno++; - } + os->lacing_returned++; + os->packetno++; return(-1); } -- cgit v1.2.1