Changeset 205

Show
Ignore:
Timestamp:
12/10/06 19:57:41 (2 years ago)
Author:
gbooker
Message:

In my experiments with VOB, I noticed it had an index of all 0 sized samples. Changed the logic for using the index to reject such indexes.

Files:

Legend:

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

    r204 r205  
    601601                /* now parse the index entries */ 
    602602                for(k = 0; k < stream->nb_index_entries; k++) { 
    603                          
    604                         *hadIndex = 1; 
    605603                         
    606604                        /* file offset */ 
     
    661659                        } 
    662660                } 
    663                 /* Add all of the samples to the media */ 
    664                 AddMediaSampleReferences64(ncstr->media, ncstr->sampleHdl, sampleNum, ncstr->sampleTable, NULL); 
    665                 free(ncstr->sampleTable); 
     661                if(sampleNum != 0) 
     662                { 
     663                        /* Add all of the samples to the media */ 
     664                        AddMediaSampleReferences64(ncstr->media, ncstr->sampleHdl, sampleNum, ncstr->sampleTable, NULL); 
     665                        free(ncstr->sampleTable);                        
     666 
     667                        /* The index is both present and not empty */ 
     668                        *hadIndex = 1; 
     669                } 
    666670        } 
    667671