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:
authorjm <jm@0101bb08-14d6-0310-b084-bc0e0c8e3800>2004-03-23 08:28:21 +0300
committerjm <jm@0101bb08-14d6-0310-b084-bc0e0c8e3800>2004-03-23 08:28:21 +0300
commited0d266c341b20f39707309ae5be40ebd0864935 (patch)
tree42e089390cb319fe485cdfea699b16f32f66a145
parent21c91dbad6dc7a672d0b5af2069cd318e4ae4aa8 (diff)
Made speexenc flush page after first header in order to be compliant
with the Ogg spec. git-svn-id: http://svn.xiph.org/branches/rel-1-0-branch/speex@6456 0101bb08-14d6-0310-b084-bc0e0c8e3800
-rw-r--r--configure.in6
-rw-r--r--src/speexenc.c15
2 files changed, 17 insertions, 4 deletions
diff --git a/configure.in b/configure.in
index 3ec8b63..594287a 100644
--- a/configure.in
+++ b/configure.in
@@ -4,11 +4,11 @@ AC_INIT(libspeex/speex.h)
SPEEX_MAJOR_VERSION=1
SPEEX_MINOR_VERSION=0
-SPEEX_MICRO_VERSION=3
-SPEEX_VERSION=1.0.3
+SPEEX_MICRO_VERSION=4
+SPEEX_VERSION=1.0.4
SPEEX_LT_CURRENT=2
-SPEEX_LT_REVISION=2
+SPEEX_LT_REVISION=3
SPEEX_LT_AGE=1
AC_SUBST(SPEEX_LT_CURRENT)
diff --git a/src/speexenc.c b/src/speexenc.c
index f5176b2..9b192e1 100644
--- a/src/speexenc.c
+++ b/src/speexenc.c
@@ -538,7 +538,7 @@ int main(int argc, char **argv)
}
- /*Write header (format will change)*/
+ /*Write header*/
{
op.packet = (unsigned char *)speex_header_to_packet(&header, (int*)&(op.bytes));
@@ -549,6 +549,19 @@ int main(int argc, char **argv)
ogg_stream_packetin(&os, &op);
free(op.packet);
+ while((result = ogg_stream_flush(&os, &og)))
+ {
+ if(!result) break;
+ ret = oe_write_page(&og, fout);
+ if(ret != og.header_len + og.body_len)
+ {
+ fprintf (stderr,"Error: failed writing header to output stream\n");
+ exit(1);
+ }
+ else
+ bytes_written += ret;
+ }
+
op.packet = (unsigned char *)comments;
op.bytes = comments_length;
op.b_o_s = 0;