Changeset 263

Show
Ignore:
Timestamp:
01/07/07 16:27:30 (2 years ago)
Author:
gbooker
Message:
  • Set all of the AudioStreamBasicDescription? in case the caller wishes to just use it.
  • Replaced the fourccs with the constants. Cleaner code, same function.
Files:

Legend:

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

    r259 r263  
    9494        uint8_t lfe = (buffer[offset + 6] >> shift) & 0x01; 
    9595         
    96         //This is a valid frame!!! 
     96        /* This is a valid frame!!! */ 
    9797        uint8_t bitrate = ac3_bitratetab[frmsizecod >> 1]; 
    9898        int sample_rate = ac3_freqs[fscod]; 
     
    102102                shift = bsid - 8; 
    103103         
     104        /* Setup the AudioStreamBasicDescription and AudioChannelLayout */ 
     105        memset(asbd, 0, sizeof(AudioStreamBasicDescription)); 
    104106        asbd->mSampleRate = sample_rate >> shift; 
     107        asbd->mFormatID = kAudioFormatAC3; 
     108        asbd->mFramesPerPacket = 1; 
    105109        asbd->mChannelsPerFrame = nfchans_tbl[acmod] + lfe; 
     110         
     111        memset(acl, 0, sizeof(AudioChannelLayout)); 
    106112        if(lfe) 
    107113                acl->mChannelLayoutTag = ac3_layout_lfe[acmod]; 
  • trunk/ff_private.c

    r260 r263  
    250250        /* We have to parse the format */ 
    251251        int useDefault = 1; 
    252         if(asbd.mFormatID == 'ac-3' || asbd.mFormatID == 'ms \0'
     252        if(asbd.mFormatID == kAudioFormatAC3 || asbd.mFormatID == kAudioFormatAC3MS
    253253        { 
    254254                if(parse_ac3_bitstream(&asbd, &acl, firstFrame->data, firstFrame->size))