Changeset 206

Show
Ignore:
Timestamp:
12/14/06 17:33:23 (2 years ago)
Author:
allan
Message:

- fixed a divide by zero that seemed to only affect intel machines

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/ff_private.c

    r205 r206  
    890890                //if we're not yet done with the import, calculate the movie load state. 
    891891                int64_t timeToCompleteFile; //time until the file should be completely available, in terms of AV_TIME_BASE 
    892                 long dataRate
     892                long dataRate = 0
    893893                 
    894894                dataResult = DataHGetDataRate(storage->dataHandler, 0, &dataRate); 
    895                 if(dataResult == noErr) { 
     895                if(dataResult == noErr && dataRate > 0) { 
    896896                        timeToCompleteFile = (AV_TIME_BASE * (storage->dataSize - availableSize)) / dataRate; 
    897897