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

shans at svn.annodex.net shans at svn.annodex.net
Wed Jun 27 23:16:58 PDT 2007


Author: shans
Date: 2007-06-27 23:16:58 -0700 (Wed, 27 Jun 2007)
New Revision: 3107

Modified:
   liboggplay/trunk/src/liboggplay/oggplay_tcp_reader.c
Log:
Fixed early stopping bug



Modified: liboggplay/trunk/src/liboggplay/oggplay_tcp_reader.c
===================================================================
--- liboggplay/trunk/src/liboggplay/oggplay_tcp_reader.c	2007-06-28 06:16:43 UTC (rev 3106)
+++ liboggplay/trunk/src/liboggplay/oggplay_tcp_reader.c	2007-06-28 06:16:58 UTC (rev 3107)
@@ -567,6 +567,12 @@
 
   fseek(me->backing_store, me->current_position, SEEK_SET);
   len = fread(buf, 1, n, me->backing_store);
+  if (len == 0) {
+    fseek(me->backing_store, 0, SEEK_END);
+    grab_some_data(me, 1);
+    fseek(me->backing_store, me->current_position, SEEK_SET);
+    len = fread(buf, 1, n, me->backing_store);
+  }
   me->current_position += len;
   fseek(me->backing_store, 0, SEEK_END);
   return len;



More information about the commits mailing list