[xiph-commits] r12189 - trunk/vorbis-tools/ogg123

conrad at svn.xiph.org conrad at svn.xiph.org
Fri Dec 8 17:50:09 PST 2006


Author: conrad
Date: 2006-12-08 17:50:07 -0800 (Fri, 08 Dec 2006)
New Revision: 12189

Modified:
   trunk/vorbis-tools/ogg123/buffer.c
Log:
Apply patch from Barry Bouwsma, verified by Tim Phipps. Closes ticket:471
"Ogg123 plays an intermittent noise after two hours of playback"


Modified: trunk/vorbis-tools/ogg123/buffer.c
===================================================================
--- trunk/vorbis-tools/ogg123/buffer.c	2006-12-09 01:37:25 UTC (rev 12188)
+++ trunk/vorbis-tools/ogg123/buffer.c	2006-12-09 01:50:07 UTC (rev 12189)
@@ -168,7 +168,7 @@
 
 int compute_dequeue_size (buf_t *buf, int request_size)
 {
-  int next_action_pos;
+  ogg_int64_t next_action_pos;
 
   /* 
      For simplicity, the number of bytes played must satisfy the following
@@ -183,10 +183,11 @@
 
     next_action_pos = buf->actions->position;
     
-    return MIN4(buf->curfill, request_size,
-		buf->size - buf->start, next_action_pos - buf->position);
+    return MIN4((ogg_int64_t)buf->curfill, (ogg_int64_t)request_size,
+               (ogg_int64_t)(buf->size - buf->start),
+               next_action_pos - buf->position);
   } else
-    return MIN3(buf->curfill, request_size, buf->size - buf->start);
+    return MIN3(buf->curfill, (long)request_size, buf->size - buf->start);
 
 }
 



More information about the commits mailing list