[xiph-commits] r3200 - liboggplay/trunk/plugin

shans at svn.annodex.net shans at svn.annodex.net
Fri Aug 24 19:12:43 PDT 2007


Author: shans
Date: 2007-08-24 19:12:42 -0700 (Fri, 24 Aug 2007)
New Revision: 3200

Modified:
   liboggplay/trunk/plugin/plugin_oggplay.c
Log:
grab the current position from the audio track when no video track is available



Modified: liboggplay/trunk/plugin/plugin_oggplay.c
===================================================================
--- liboggplay/trunk/plugin/plugin_oggplay.c	2007-08-21 22:52:32 UTC (rev 3199)
+++ liboggplay/trunk/plugin/plugin_oggplay.c	2007-08-25 02:12:42 UTC (rev 3200)
@@ -64,17 +64,11 @@
   char            * location;
   char            * proxy;
   int               proxy_port;
-  long long         padding0;
   semaphore         seek_sem;
-  long long         padding1;
   volatile int      seek_flag;
-  long long         padding2;
   long              seek_pos;
-  long long         padding3;
   OggPlayErrorCode  seek_err;
-  long long         padding4;
   semaphore         start_stop_sem;
-  long long         padding5;
   long              last_displayed_frame_time;
 #if defined(XP_UX)
   pthread_t         thread;
@@ -409,6 +403,13 @@
                       (unsigned char*)audio_data, samples, sizeof(short), 
                       pointers->audio_channels);  
         };
+
+        /* no video data - get the presentation time of the audio instead */
+        if (pointers->video_rate == 0) {
+          pointers->last_displayed_frame_time = 
+            oggplay_callback_info_get_presentation_time(headers[required - 1]);
+          pointers->last_displayed_frame_time -= AUDIO_TRACK_OFFSET;
+        }
   	    break;
 #endif
       case OGGPLAY_CMML:



More information about the commits mailing list