Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/xiph/speex.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgmaxwell <gmaxwell@0101bb08-14d6-0310-b084-bc0e0c8e3800>2008-02-15 00:52:20 +0300
committergmaxwell <gmaxwell@0101bb08-14d6-0310-b084-bc0e0c8e3800>2008-02-15 00:52:20 +0300
commit0f4d18571230504226e6cb936f09523752690250 (patch)
tree8e50a425de2b4f0acf5caa362a016aa6501add87
parentfa2de633b25f998388f731b7f24acc89199edfed (diff)
Correct fix from r14511. Jm advises Speex packets can be <5 bytes.
git-svn-id: http://svn.xiph.org/trunk/speex@14512 0101bb08-14d6-0310-b084-bc0e0c8e3800
-rw-r--r--src/speexdec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/speexdec.c b/src/speexdec.c
index e4a425a..ff4bdfb 100644
--- a/src/speexdec.c
+++ b/src/speexdec.c
@@ -639,9 +639,9 @@ int main(int argc, char **argv)
last_granule = page_granule;
/*Extract all available packets*/
packet_no=0;
- while (!eos && ogg_stream_packetout(&os, &op) == 1 && op.bytes>=5)
+ while (!eos && ogg_stream_packetout(&os, &op) == 1)
{
- if (!memcmp(op.packet, "Speex", 5)) {
+ if (op.bytes>=5 && !memcmp(op.packet, "Speex", 5)) {
speex_serialno = os.serialno;
}
if (speex_serialno == -1 || os.serialno != speex_serialno)