[xiph-cvs] r6572 - trunk/postfish

xiphmont at xiph.org xiphmont at xiph.org
Tue May 4 21:25:18 PDT 2004



Author: xiphmont
Date: 2004-04-22 03:37:57 -0400 (Thu, 22 Apr 2004)
New Revision: 6572

Modified:
   trunk/postfish/freq.c
Log:
fix end-of-stream flushing; eq.c was giving up too early due to a logic error.

<p><p>Modified: trunk/postfish/freq.c
===================================================================
--- trunk/postfish/freq.c	2004-04-22 06:09:19 UTC (rev 6571)
+++ trunk/postfish/freq.c	2004-04-22 07:37:57 UTC (rev 6572)
@@ -433,7 +433,7 @@
       f->cache[i]=temp;
     }
       
-    f->cache_samples=in->samples;
+    f->cache_samples+=in->samples;
     f->fillstate=2;
     f->out.samples=0;
     if(in->samples==in->size)goto tidy_up;
@@ -468,8 +468,10 @@
       f->cache[i]=in->data[i];
       in->data[i]=temp;
     }
-    f->out.samples=f->cache_samples;
-    f->cache_samples=in->samples;
+
+    f->cache_samples+=in->samples;
+    f->out.samples=(f->cache_samples>input_size?input_size:f->cache_samples);
+    f->cache_samples-=f->out.samples;
     if(f->out.samples<f->out.size)f->fillstate=3;
     break;
   case 3: /* we've pushed out EOF already */

--- >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