[xiph-commits] r10647 - trunk/xiph-qt/OggImport/src
arek at svn.xiph.org
arek at svn.xiph.org
Sun Dec 18 12:56:50 PST 2005
Author: arek
Date: 2005-12-18 12:56:46 -0800 (Sun, 18 Dec 2005)
New Revision: 10647
Modified:
trunk/xiph-qt/OggImport/src/OggImport.c
trunk/xiph-qt/OggImport/src/importer_types.h
Log:
Fixed data size/offsets initialisation.
Modified: trunk/xiph-qt/OggImport/src/OggImport.c
===================================================================
--- trunk/xiph-qt/OggImport/src/OggImport.c 2005-12-18 19:29:31 UTC (rev 10646)
+++ trunk/xiph-qt/OggImport/src/OggImport.c 2005-12-18 20:56:46 UTC (rev 10647)
@@ -884,22 +884,10 @@
globals->currentGroupOffset = globals->startTime;
globals->groupStreamsFound = false;
- if (S64Compare(globals->dataEndOffset, S64Set(-1)) == 0) {
- globals->sizeInitialised = false;
- globals->state = kStateGettingSize;
+ if (!globals->sizeInitialised) {
result = XQTGetFileSize(globals);
- if (!globals->sizeInitialised)
+ if (result != noErr)
process = false;
- } else
- globals->state = kStateReadingPages;
-
- break;
-
- case kStateGettingSize:
- dbg_printf(" - (:kStateGettingSize:)\n");
- if (!globals->sizeInitialised) {
- process = false;
- break;
}
globals->state = kStateReadingPages;
@@ -1187,6 +1175,7 @@
globals->self = self;
globals->dataEndOffset = S64Set(-1);
+ globals->sizeInitialised = false;
globals->idleManager = NULL;
globals->dataIdleManager = NULL;
@@ -1260,6 +1249,7 @@
dbg_printf("-- SetOffsetAndLimit64(%ld%ld, %ld%ld) called\n", offset->hi, offset->lo, limit->hi, limit->lo);
globals->dataStartOffset = WideToSInt64(*offset);
globals->dataEndOffset = WideToSInt64(*limit);
+ globals->sizeInitialised = true;
return noErr;
}
@@ -1271,6 +1261,7 @@
dbg_printf("-- SetOffsetAndLimit(%ld, %ld) called\n", offset, limit);
globals->dataStartOffset = S64SetU(offset);
globals->dataEndOffset = S64SetU(limit);
+ globals->sizeInitialised = true;
return noErr;
}
@@ -1524,7 +1515,6 @@
switch (globals->state)
{
case kStateInitial:
- case kStateGettingSize:
*loadState = kMovieLoadStateLoading;
break;
Modified: trunk/xiph-qt/OggImport/src/importer_types.h
===================================================================
--- trunk/xiph-qt/OggImport/src/importer_types.h 2005-12-18 19:29:31 UTC (rev 10646)
+++ trunk/xiph-qt/OggImport/src/importer_types.h 2005-12-18 20:56:46 UTC (rev 10647)
@@ -71,7 +71,6 @@
typedef enum ImportStates {
kStateInitial,
- kStateGettingSize,
kStateReadingPages,
kStateReadingLastPages,
kStateImportComplete
More information about the commits
mailing list