[xiph-cvs] cvs commit: ices/src encode.c

Michael Smith msmith at xiph.org
Fri Jul 5 00:40:49 PDT 2002



msmith      02/07/05 00:40:49

  Modified:    src      encode.c
  Log:
  Fix EOS encoding in managed modes.

Revision  Changes    Path
1.7       +6 -3      ices/src/encode.c

Index: encode.c
===================================================================
RCS file: /usr/local/cvsroot/ices/src/encode.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- encode.c	2002/01/28 12:52:59	1.6
+++ encode.c	2002/07/05 07:40:47	1.7
@@ -1,7 +1,7 @@
 /* encode.c
  * - runtime encoding of PCM data.
  *
- * $Id: encode.c,v 1.6 2002/01/28 12:52:59 msmith Exp $
+ * $Id: encode.c,v 1.7 2002/07/05 07:40:47 msmith Exp $
  *
  * Copyright (c) 2001 Michael Smith <msmith at labyrinth.net.au>
  *
@@ -197,13 +197,16 @@
 
 void encode_finish(encoder_state *s)
 {
+    int ret;
         ogg_packet op;
         vorbis_analysis_wrote(&s->vd, 0);
 
         while(vorbis_analysis_blockout(&s->vd, &s->vb)==1)
         {
-		vorbis_analysis(&s->vb, &op);
-		ogg_stream_packetin(&s->os, &op);
+        vorbis_analysis(&s->vb, NULL);
+        vorbis_bitrate_addblock(&s->vb);
+        while(vorbis_bitrate_flushpacket(&s->vd, &op))
+		    ogg_stream_packetin(&s->os, &op);
         }
 
 }

<p><p><p>--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the commits mailing list