diff options
author | Monty <xiphmont@xiph.org> | 2001-05-24 21:22:52 +0000 |
---|---|---|
committer | Monty <xiphmont@xiph.org> | 2001-05-24 21:22:52 +0000 |
commit | a88ea667d99d92b9cac675cb1e08cb6a5f4e9512 (patch) | |
tree | ca459a3c5a548181ac6b3d3407b7b0442f32b49c /src/framing.c | |
parent | 0552c33c9612b3592831b8cbe49a217a3856018f (diff) | |
download | ogg-git-a88ea667d99d92b9cac675cb1e08cb6a5f4e9512.tar.gz |
optimization when using peek as a packet detector
svn path=/trunk/ogg/; revision=1455
Diffstat (limited to 'src/framing.c')
-rw-r--r-- | src/framing.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/framing.c b/src/framing.c index 128c98e..e608b9f 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.13 2001/05/24 05:17:14 xiphmont Exp $ + last mod: $Id: framing.c,v 1.14 2001/05/24 21:22:52 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 @@ -784,6 +784,10 @@ static int _packetout(ogg_stream_state *os,ogg_packet *op,int adv){ return(-1); } + if(!op && !adv)return(1); /* just using peek as an inexpensive way + to ask if there's a whole packet + waiting */ + /* Gather the whole packet. We'll have no holes or a partial packet */ { int size=os->lacing_vals[ptr]&0xff; |