[xiph-commits] r3245 - in liboggplay/trunk/src: liboggplay tools
shans at svn.annodex.net
shans at svn.annodex.net
Tue Oct 2 22:12:58 PDT 2007
Author: shans
Date: 2007-10-02 22:12:58 -0700 (Tue, 02 Oct 2007)
New Revision: 3245
Modified:
liboggplay/trunk/src/liboggplay/oggplay.c
liboggplay/trunk/src/liboggplay/oggplay_callback_info.c
liboggplay/trunk/src/tools/glut-player.c
Log:
Fix for crash at end of audio-only files.
Some commenting additions
Modified: liboggplay/trunk/src/liboggplay/oggplay.c
===================================================================
--- liboggplay/trunk/src/liboggplay/oggplay.c 2007-10-02 06:39:03 UTC (rev 3244)
+++ liboggplay/trunk/src/liboggplay/oggplay.c 2007-10-03 05:12:58 UTC (rev 3245)
@@ -400,7 +400,7 @@
int remaining = 0;
for (i = 0; i < me->num_tracks; i++) {
if (me->decode_data[i]->current_loc +
- me->decode_data[i]->granuleperiod >= me->target) {
+ me->decode_data[i]->granuleperiod >= me->target + me->decode_data[i]->offset) {
remaining++;
}
}
Modified: liboggplay/trunk/src/liboggplay/oggplay_callback_info.c
===================================================================
--- liboggplay/trunk/src/liboggplay/oggplay_callback_info.c 2007-10-02 06:39:03 UTC (rev 3244)
+++ liboggplay/trunk/src/liboggplay/oggplay_callback_info.c 2007-10-03 05:12:58 UTC (rev 3245)
@@ -70,6 +70,10 @@
(*info)[i] = track_info;
+ /*
+ * this track is inactive and has no data - create an empty record
+ * for it
+ */
if (track->active == 0 && track->data_list == NULL) {
track_info->data_type = OGGPLAY_INACTIVE;
track_info->available_records = track_info->required_records = 0;
@@ -90,7 +94,10 @@
count++;
}
}
-
+
+ /*
+ * tcount is set if any of the tracks have unpresented data
+ */
if (count > 0) {
tcount = 1;
@@ -156,8 +163,8 @@
}
-
- /*printf("%d: %d/%d\t", i,
+ /*
+ printf("%d: %d/%d\t", i,
track_info->required_records, count);
if (q != NULL) {
Modified: liboggplay/trunk/src/tools/glut-player.c
===================================================================
--- liboggplay/trunk/src/tools/glut-player.c 2007-10-02 06:39:03 UTC (rev 3244)
+++ liboggplay/trunk/src/tools/glut-player.c 2007-10-03 05:12:58 UTC (rev 3245)
@@ -25,7 +25,7 @@
#include <fcntl.h>
#if !(defined(__APPLE__) || defined(WIN32))
-#define USE_AUDIO 0
+#define USE_AUDIO 1
#else
#define USE_AUDIO 0
#endif
More information about the commits
mailing list