Changeset 842

Show
Ignore:
Timestamp:
04/02/08 21:05:08 (4 months ago)
Author:
gbooker
Message:

Reverted r741 since Apple has fixed the bug in the latest QT

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/CAPublicUtility/CAStreamBasicDescription.cpp

    r806 r842  
    5050        #include <Endian.h> 
    5151#endif 
    52  
    53 #import "CodecIDs.h" 
    5452 
    5553const AudioStreamBasicDescription       CAStreamBasicDescription::sEmpty = { 0.0, 0, 0, 0, 0, 0, 0, 0, 0 }; 
     
    274272                 
    275273                case kAudioFormatAC3: 
    276                 case kAudioFormatAC3MS: 
    277274                        strcpy(outName, "AC-3"); 
    278275                        break; 
  • trunk/MatroskaCodecIDs.cpp

    r816 r842  
    779779                                 
    780780                        case kAudioFormatAC3: 
    781                         case kAudioFormatAC3MS: 
    782781                                acl = ac3ChannelLayouts[channelIndex]; 
    783782                                break; 
     
    813812        { kAudioFormatMPEGLayer2, 0x50 }, 
    814813        { kAudioFormatMPEGLayer3, 0x55 }, 
    815         { kAudioFormatAC3MS, 0x2000 }, 
     814        { kAudioFormatAC3, 0x2000 }, 
    816815        { kAudioFormatDTS, 0x2001 }, 
    817816        { kAudioFormatMPEG4AAC, 0xff }, 
     
    855854        { kAudioFormatMPEGLayer2, "A_MPEG/L2" }, 
    856855        { kAudioFormatMPEGLayer3, "A_MPEG/L3" }, 
    857         { kAudioFormatAC3MS, "A_AC3" }, 
     856        { kAudioFormatAC3, "A_AC3" }, 
    858857        { kAudioFormatAC3MS, "A_AC3" }, 
    859858        // anything special for these two? 
    860         { kAudioFormatAC3MS, "A_AC3/BSID9" }, 
    861         { kAudioFormatAC3MS, "A_AC3/BSID10" }, 
     859        { kAudioFormatAC3, "A_AC3/BSID9" }, 
     860        { kAudioFormatAC3, "A_AC3/BSID10" }, 
    862861        { kAudioFormatXiphVorbis, "A_VORBIS" }, 
    863862        { kAudioFormatXiphFLAC, "A_FLAC" }, 
  • trunk/MatroskaImportPrivate.cpp

    r806 r842  
    970970                switch ((*desc)->dataFormat) { 
    971971                        case kAudioFormatAC3: 
    972                         case kAudioFormatAC3MS: 
    973972                                replaceSoundDesc = parse_ac3_bitstream(&asbd, &acl, block.GetBuffer(0).Buffer(), block.GetFrameSize(0)); 
    974973                                break; 
  • trunk/bitstream_info.c

    r818 r842  
    1212#include <AudioToolbox/AudioToolbox.h> 
    1313#include <QuickTime/QuickTime.h> 
    14 #include "CodecIDs.h" 
    1514 
    1615#import "ac3tab.h" 
     
    3332        return a < b ? a : b; 
    3433} 
    35  
    36 #define AV_RB16(x) ((((uint8_t*)(x))[0] << 8) | ((uint8_t*)(x))[1]) 
    3734 
    3835static const int nfchans_tbl[8] = { 2, 1, 2, 3, 3, 4, 4, 5 }; 
     
    129126        memset(asbd, 0, sizeof(AudioStreamBasicDescription)); 
    130127        asbd->mSampleRate = sample_rate >> shift; 
    131         asbd->mFormatID = kAudioFormatAC3MS
     128        asbd->mFormatID = kAudioFormatAC3
    132129        asbd->mFramesPerPacket = 1; 
    133130        asbd->mChannelsPerFrame = nfchans_tbl[acmod] + lfe; 
     
    494491                if(context->is_avc) 
    495492                { 
    496                         int i; 
    497493                        if(buf_index >= buf_size) 
    498494                                break; 
    499495                        nalsize = 0; 
    500                         for(i = 0; i< context->nal_length_size; i++) 
    501                                 nalsize = (nalsize << 8) | buf[buf_index++]; 
     496                        switch (context->nal_length_size) { 
     497                                case 1: 
     498                                        nalsize = buf[buf_index]; 
     499                                        buf_index++; 
     500                                        break; 
     501                                case 2: 
     502                                        nalsize = (buf[buf_index] << 8) | buf[buf_index+1]; 
     503                                        buf_index += 2; 
     504                                        break; 
     505                                case 3: 
     506                                        nalsize = (buf[buf_index] << 16) | (buf[buf_index+1] << 8) | buf[buf_index + 2]; 
     507                                        buf_index += 3; 
     508                                        break; 
     509                                case 4: 
     510                                        nalsize = (buf[buf_index] << 24) | (buf[buf_index+1] << 16) | (buf[buf_index + 2] << 8) | buf[buf_index + 3]; 
     511                                        buf_index += 4; 
     512                                        break; 
     513                                default: 
     514                                        break; 
     515                        } 
    502516                        if(nalsize <= 1 || nalsize > buf_size) 
    503517                        { 
  • trunk/ff_private.c

    r806 r842  
    320320                        break; 
    321321                case CODEC_ID_AC3: 
    322                         asbd->mFormatID = kAudioFormatAC3MS
     322                        asbd->mFormatID = kAudioFormatAC3
    323323                        map->vbr = 1; 
    324324                        break;