Changeset 812

Show
Ignore:
Timestamp:
02/18/08 19:13:31 (8 months ago)
Author:
astrange
Message:

Be slightly more paranoid in case it doesn't list a profile either.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/MatroskaCodecIDs.cpp

    r811 r812  
    371371static void RecreateAACVOS(KaxTrackEntry *tr_entry, uint8_t *vosBuf, size_t *vosLen) 
    372372{ 
    373         unsigned char profile = 0, freq_index = 15; 
     373        unsigned char profile = 2, freq_index = 15; 
    374374        KaxCodecID *tr_codec = FindChild<KaxCodecID>(*tr_entry); 
    375375        KaxTrackAudio & audioTrack = GetChild<KaxTrackAudio>(*tr_entry); 
     
    393393                *vosBuf++ = (freq_index << 7) | (channels << 3); 
    394394                *vosLen = 2; 
    395         } else { 
    396                 freq = EndianU32_NtoB(freq); 
    397                  
     395        } else {                 
    398396                *vosBuf++ = (profile << 3) | (freq_index >> 1); 
    399397                *vosBuf++ = (freq_index << 7) | (freq >> (24 - 7)); 
    400                 *vosBuf++ = (freq >> (24 - 7 - 8)) & 0xff
    401                 *vosBuf++ = (freq >> (24 - 7 - 16)) & 0xff
     398                *vosBuf++ = (freq >> (24 - 7 - 8))
     399                *vosBuf++ = (freq >> (24 - 7 - 16))
    402400                *vosBuf++ = ((freq & 1) << 7) | (channels << 3); 
    403401                *vosLen = 5;