[xiph-commits] r11790 - trunk/speex/src
jm at svn.xiph.org
jm at svn.xiph.org
Thu Aug 17 05:39:51 PDT 2006
Author: jm
Date: 2006-08-17 05:39:48 -0700 (Thu, 17 Aug 2006)
New Revision: 11790
Modified:
trunk/speex/src/speexdec.c
Log:
Patch by Tahseen to ignore CMML or other non-Speex logical streams.
Modified: trunk/speex/src/speexdec.c
===================================================================
--- trunk/speex/src/speexdec.c 2006-08-16 18:12:27 UTC (rev 11789)
+++ trunk/speex/src/speexdec.c 2006-08-17 12:39:48 UTC (rev 11790)
@@ -462,7 +462,7 @@
int extra_headers;
int wav_format=0;
int lookahead;
- int skeleton_serialno = -1;
+ int speex_serialno = -1;
enh_enabled = 1;
@@ -605,8 +605,8 @@
stream_init = 1;
}
if (ogg_page_serialno(&og) != os.serialno) {
- /* so that both skeleton & speex pages are read. */
- os.serialno = ogg_page_serialno(&og);
+ /* so all streams are read. */
+ ogg_stream_reset_serialno(&os, ogg_page_serialno(&og));
}
/*Add page to the bitstream*/
ogg_stream_pagein(&os, &og);
@@ -628,13 +628,13 @@
last_granule = page_granule;
/*Extract all available packets*/
packet_no=0;
- while (!eos && ogg_stream_packetout(&os, &op)==1)
+ while (!eos && ogg_stream_packetout(&os, &op) == 1)
{
- if (!memcmp(op.packet, "fishead", 7) || !memcmp(op.packet, "fisbone", 7)) {
- /* skipping the skeleotn packets, also saving the skeleton stream serial number. */
- skeleton_serialno = os.serialno;
+ if (!memcmp(op.packet, "Speex", 5)) {
+ speex_serialno = os.serialno;
+ }
+ if (speex_serialno == -1 || os.serialno != speex_serialno)
break;
- }
/*If first packet, process as Speex header*/
if (packet_count==0)
{
@@ -660,7 +660,7 @@
lost=1;
/*End of stream condition*/
- if (op.e_o_s && os.serialno != skeleton_serialno) /* don't set eos for skeleton e_o_s */
+ if (op.e_o_s && os.serialno == speex_serialno) /* don't care for anything except speex eos */
eos=1;
/*Copy Ogg packet to Speex bitstream*/
More information about the commits
mailing list