[xiph-commits] r3022 - in liboggplay/trunk/src: liboggplay tools

shans at svn.annodex.net shans at svn.annodex.net
Thu Jun 21 06:03:08 PDT 2007


Author: shans
Date: 2007-06-21 06:03:07 -0700 (Thu, 21 Jun 2007)
New Revision: 3022

Modified:
   liboggplay/trunk/src/liboggplay/oggplay_seek.c
   liboggplay/trunk/src/tools/glut-player.c
Log:
Reverse seeking now works too, although there are reasonably frequent
segfaults.



Modified: liboggplay/trunk/src/liboggplay/oggplay_seek.c
===================================================================
--- liboggplay/trunk/src/liboggplay/oggplay_seek.c	2007-06-21 12:27:50 UTC (rev 3021)
+++ liboggplay/trunk/src/liboggplay/oggplay_seek.c	2007-06-21 13:03:07 UTC (rev 3022)
@@ -99,7 +99,8 @@
   /*
    * set the presentation time
    */
-  me->presentation_time = milliseconds;
+  me->presentation_time = ((ogg_int64_t)milliseconds) << 32;
+  me->target = me->presentation_time + me->callback_period;
   
   return E_OGGPLAY_OK;
   

Modified: liboggplay/trunk/src/tools/glut-player.c
===================================================================
--- liboggplay/trunk/src/tools/glut-player.c	2007-06-21 12:27:50 UTC (rev 3021)
+++ liboggplay/trunk/src/tools/glut-player.c	2007-06-21 13:03:07 UTC (rev 3022)
@@ -399,8 +399,11 @@
       }
       msg = 0;
     }
-        
-    r = oggplay_step_decoding(player);    
+    
+    r = E_OGGPLAY_TIMEOUT;
+    while (r == E_OGGPLAY_TIMEOUT) {
+      r = oggplay_step_decoding(player);
+    }
 
     if (r != E_OGGPLAY_CONTINUE && r != E_OGGPLAY_USER_INTERRUPT) {
       printf("hmm, totally bogus, dude.  r is %d\n", r);



More information about the commits mailing list