[xiph-commits] r3842 - liboggplay/trunk/src/examples

wiking at svn.annodex.net wiking at svn.annodex.net
Thu Jan 15 19:58:24 PST 2009


Author: wiking
Date: 2009-01-15 19:58:24 -0800 (Thu, 15 Jan 2009)
New Revision: 3842

Modified:
   liboggplay/trunk/src/examples/glut-player.c
Log:
fix glut player flickering


Modified: liboggplay/trunk/src/examples/glut-player.c
===================================================================
--- liboggplay/trunk/src/examples/glut-player.c	2009-01-16 03:47:03 UTC (rev 3841)
+++ liboggplay/trunk/src/examples/glut-player.c	2009-01-16 03:58:24 UTC (rev 3842)
@@ -35,9 +35,9 @@
 #endif
 
 #if !(defined(__APPLE__) || defined(WIN32))
-#define USE_AUDIO 1
+#define USE_AUDIO 1 
 #else
-#define USE_AUDIO 0
+#define USE_AUDIO 0 
 #endif
 
 #if USE_AUDIO
@@ -246,9 +246,9 @@
       long long offset = (target - (bytes * 10000 / rate / 4)) * 100;
 #else
     {
-      long long offset = 400 * 100;
+      long long offset = fps_denom*10000/fps_num * 100;
 #endif
-      target += 400;
+      target += fps_denom*10000/fps_num;
     
 #if DISPLAY_FRAMES
       if (offset > 0) {
@@ -486,7 +486,7 @@
     {
       int ret;
       audio_track = i;      
-      oggplay_set_offset(player, i, 250L);
+      oggplay_set_offset(player, i, 500L);
       ret = oggplay_get_audio_samplerate(player, i , &rate);
       ret = oggplay_get_audio_channels(player, i, &channels);
       printf("samplerate: %d channels: %d\n", rate, channels);



More information about the commits mailing list