[xiph-commits] r3240 - libannodex/trunk/src/importers
shans at svn.annodex.net
shans at svn.annodex.net
Thu Sep 13 16:58:21 PDT 2007
Author: shans
Date: 2007-09-13 16:58:20 -0700 (Thu, 13 Sep 2007)
New Revision: 3240
Modified:
libannodex/trunk/src/importers/anx_import_ogg.c
Log:
Set the state to filter after scanning through the file, even if some
keygranules haven't been found.
Modified: libannodex/trunk/src/importers/anx_import_ogg.c
===================================================================
--- libannodex/trunk/src/importers/anx_import_ogg.c 2007-09-13 01:18:45 UTC (rev 3239)
+++ libannodex/trunk/src/importers/anx_import_ogg.c 2007-09-13 23:58:20 UTC (rev 3240)
@@ -553,6 +553,12 @@
AnxSourceTrack * track = &(aot->source_track);
double timestamp;
+#ifdef DEBUG
+ fprintf(aod->df, "state %s got_keygranule %d gp %llx keygranule %llx\n",
+ aod->state == STATE_FILTER ? "FILTER" : "NOFILTER",
+ aot->filter_got_keygranule, op->granulepos, aot->keygranule);
+#endif
+
/* TRUE if we're not in state FILTER */
if (aod->state != STATE_FILTER) return 1;
@@ -561,6 +567,11 @@
timestamp = gp_to_time (aod->oggz, serialno, op->granulepos);
+#ifdef DEBUG
+ fprintf(aod->df, "timestamp %f start_time %f\n", timestamp,
+ aod->anx_source->start_time);
+#endif
+
/* TRUE if we're beyond the start time */
if (timestamp-TOLERANCE >= aod->anx_source->start_time) {
aod->state = STATE_DATA;
@@ -728,7 +739,8 @@
}
#ifdef DEBUG
- fprintf (aod->df, "anxogg::read_packet: Filter?\n");
+ fprintf (aod->df, "anxogg::read_packet: Filter? (%s)\n",
+ aod->state == STATE_FILTER ? "USE_FN" : "NO_FN");
#endif
if (!aod->ignore_media && !aod->got_end && !aot->anxv2_ignore_packet &&
@@ -1032,6 +1044,7 @@
oggz_set_read_page (aod->oggz, -1, read_page_granuleinfo, aod);
while (aod->state == STATE_GRANULEINFO &&
(n = oggz_read (aod->oggz, 1024)) != 0);
+ aod->state = STATE_FILTER;
oggz_set_read_page (aod->oggz, -1, NULL, NULL);
}
More information about the commits
mailing list