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

shans at svn.annodex.net shans at svn.annodex.net
Tue Jun 26 18:55:47 PDT 2007


Author: shans
Date: 2007-06-26 18:55:47 -0700 (Tue, 26 Jun 2007)
New Revision: 3074

Modified:
   liboggplay/trunk/src/liboggplay/oggplay_seek.c
   liboggplay/trunk/src/liboggplay/oggplay_tcp_reader.c
Log:
Some more bugs in seeking fixed.  One was due to dodgy tcp reader code :(



Modified: liboggplay/trunk/src/liboggplay/oggplay_seek.c
===================================================================
--- liboggplay/trunk/src/liboggplay/oggplay_seek.c	2007-06-27 01:54:30 UTC (rev 3073)
+++ liboggplay/trunk/src/liboggplay/oggplay_seek.c	2007-06-27 01:55:47 UTC (rev 3074)
@@ -108,15 +108,11 @@
     track->stream_info = OGGPLAY_STREAM_JUST_SEEKED;
   }
 
-  milliseconds = oggz_tell_units(me->reader);
-
   /*
    * set the presentation time
    */
-  me->presentation_time = ((ogg_int64_t)milliseconds) << 32;
-  me->presentation_time /= me->callback_period;
-  me->presentation_time *= me->callback_period;
-  me->target = me->presentation_time + me->callback_period;
+  me->presentation_time = 0; 
+  me->target = me->callback_period - 1;
 
   trash->next = NULL;
 

Modified: liboggplay/trunk/src/liboggplay/oggplay_tcp_reader.c
===================================================================
--- liboggplay/trunk/src/liboggplay/oggplay_tcp_reader.c	2007-06-27 01:54:30 UTC (rev 3073)
+++ liboggplay/trunk/src/liboggplay/oggplay_tcp_reader.c	2007-06-27 01:55:47 UTC (rev 3074)
@@ -554,7 +554,6 @@
   grab_some_data(me, 0);
 
   fseek(me->backing_store, me->current_position, SEEK_SET);
-  me->current_position = ftell(me->backing_store);
   len = fread(buf, 1, n, me->backing_store);
   me->current_position += len;
   fseek(me->backing_store, 0, SEEK_END);
@@ -569,6 +568,7 @@
 
   r = fseek(me->backing_store, offset, whence);
   me->current_position = ftell(me->backing_store);
+  fseek(me->backing_store, 0, SEEK_END);
 
   return r;
 }



More information about the commits mailing list