Changeset 459

Show
Ignore:
Timestamp:
04/22/07 23:52:01 (1 year ago)
Author:
dconrad
Message:

Use timestamp instead of size to determine which index entry corresponds to the packet we read to determine the difference between the offsets in the index and the actual file offsets.
Disable zerolink in the libebml and libmatroska builds, should hopefully fix debugging.
Also bring change the strip style of libebml and libmatroska to the same as the main component.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/Perian.xcodeproj/project.pbxproj

    r424 r459  
    666666                F560DF0203D622D001ABA332 /* FFusionCodec.r */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.rez; path = FFusionCodec.r; sourceTree = "<group>"; }; 
    667667                F57755F40B51EB1800C7D833 /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = /System/Library/Frameworks/CoreFoundation.framework; sourceTree = "<absolute>"; }; 
    668                 F5CFD1B40B50009000616865 /* PerianPanePListGenerator */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = "compiled.mach-o.executable"; path = PerianPanePListGenerator; sourceTree = BUILT_PRODUCTS_DIR; }; 
     668                F5CFD1B40B50009000616865 /* PerianPanePListGenerator */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = PerianPanePListGenerator; sourceTree = BUILT_PRODUCTS_DIR; }; 
    669669                F5CFD1BC0B5000CE00616865 /* GBPerianPanePListGenerator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GBPerianPanePListGenerator.h; sourceTree = "<group>"; }; 
    670670                F5CFD1BD0B5000CE00616865 /* GBPerianPanePListGenerator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GBPerianPanePListGenerator.m; sourceTree = "<group>"; }; 
     
    21362136                                PREBINDING = NO; 
    21372137                                PRODUCT_NAME = ebml; 
     2138                                STRIP_STYLE = "non-global"; 
    21382139                                USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/libebml"; 
    21392140                                ZERO_LINK = NO; 
     
    21552156                                PREBINDING = NO; 
    21562157                                PRODUCT_NAME = matroska; 
     2158                                STRIP_STYLE = "non-global"; 
    21572159                                USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/libmatroska $(SRCROOT)/libebml"; 
    21582160                                ZERO_LINK = NO; 
     
    23742376                                PREBINDING = NO; 
    23752377                                PRODUCT_NAME = ebml; 
     2378                                STRIP_STYLE = "non-global"; 
    23762379                                USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/libebml"; 
    23772380                                ZERO_LINK = NO; 
     
    23942397                                PREBINDING = NO; 
    23952398                                PRODUCT_NAME = ebml; 
     2399                                STRIP_STYLE = "non-global"; 
    23962400                                USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/libebml"; 
    23972401                                ZERO_LINK = NO; 
     
    24112415                                PREBINDING = NO; 
    24122416                                PRODUCT_NAME = ebml; 
     2417                                STRIP_STYLE = "non-global"; 
    24132418                                USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/libebml"; 
    2414                                 ZERO_LINK = YES
     2419                                ZERO_LINK = NO
    24152420                        }; 
    24162421                        name = Default; 
     
    24322437                                PREBINDING = NO; 
    24332438                                PRODUCT_NAME = matroska; 
     2439                                STRIP_STYLE = "non-global"; 
    24342440                                USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/libmatroska $(SRCROOT)/libebml"; 
    24352441                                ZERO_LINK = NO; 
     
    24512457                                PREBINDING = NO; 
    24522458                                PRODUCT_NAME = matroska; 
     2459                                STRIP_STYLE = "non-global"; 
    24532460                                USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/libmatroska $(SRCROOT)/libebml"; 
    24542461                                ZERO_LINK = NO; 
     
    24682475                                PREBINDING = NO; 
    24692476                                PRODUCT_NAME = matroska; 
     2477                                STRIP_STYLE = "non-global"; 
    24702478                                USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/libmatroska $(SRCROOT)/libebml"; 
    2471                                 ZERO_LINK = YES
     2479                                ZERO_LINK = NO
    24722480                        }; 
    24732481                        name = Default; 
  • trunk/ff_private.c

    r432 r459  
    566566        { 
    567567                int streamsRead = 0; 
     568                AVStream *st; 
     569                 
    568570                result = av_seek_frame(formatContext, -1, 0, 0); 
    569571                if(result < 0) goto bail; 
    570572                 
    571                 formatContext->iformat->read_packet(formatContext, &packet); 
     573                av_read_frame(formatContext, &packet); 
     574                st = formatContext->streams[packet.stream_index]; 
     575                 
    572576                /* read_packet will give the first decodable packet. However, that isn't necessarily 
    573577                        the first entry in the index, so look for an entry with a matching size. */ 
    574                 for (i = 0; i < formatContext->streams[packet.stream_index]->nb_index_entries; i++) { 
    575                         if (packet.size == formatContext->streams[packet.stream_index]->index_entries[i].size) { 
    576                                 storage->header_offset = packet.pos - formatContext->streams[packet.stream_index]->index_entries[i].pos; 
     578                for (i = 0; i < st->nb_index_entries; i++) { 
     579                        if (packet.dts == st->index_entries[i].timestamp) { 
     580                                storage->header_offset = packet.pos - st->index_entries[i].pos; 
    577581                                break; 
    578582                        }