[xiph-commits] r3098 - liboggplay/trunk/src/liboggplay

shans at svn.annodex.net shans at svn.annodex.net
Wed Jun 27 06:41:18 PDT 2007


Author: shans
Date: 2007-06-27 06:41:17 -0700 (Wed, 27 Jun 2007)
New Revision: 3098

Modified:
   liboggplay/trunk/src/liboggplay/oggplay_tcp_reader.c
Log:
Never return more than duration in availability


Modified: liboggplay/trunk/src/liboggplay/oggplay_tcp_reader.c
===================================================================
--- liboggplay/trunk/src/liboggplay/oggplay_tcp_reader.c	2007-06-27 10:05:51 UTC (rev 3097)
+++ liboggplay/trunk/src/liboggplay/oggplay_tcp_reader.c	2007-06-27 13:41:17 UTC (rev 3098)
@@ -543,6 +543,10 @@
   }
 
   grab_some_data(me, 0);
+  if (me->duration > -1 && ((tpb * me->stored_offset) >> 16) > me->duration)
+  {
+    return me->duration;
+  }
   return (int)((tpb * me->stored_offset) >> 16);
 
 }



More information about the commits mailing list