Changeset 842
- Timestamp:
- 04/02/08 21:05:08 (4 months ago)
- Files:
-
- trunk/CAPublicUtility/CAStreamBasicDescription.cpp (modified) (2 diffs)
- trunk/MatroskaCodecIDs.cpp (modified) (3 diffs)
- trunk/MatroskaImportPrivate.cpp (modified) (1 diff)
- trunk/bitstream_info.c (modified) (4 diffs)
- trunk/ff_private.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/CAPublicUtility/CAStreamBasicDescription.cpp
r806 r842 50 50 #include <Endian.h> 51 51 #endif 52 53 #import "CodecIDs.h"54 52 55 53 const AudioStreamBasicDescription CAStreamBasicDescription::sEmpty = { 0.0, 0, 0, 0, 0, 0, 0, 0, 0 }; … … 274 272 275 273 case kAudioFormatAC3: 276 case kAudioFormatAC3MS:277 274 strcpy(outName, "AC-3"); 278 275 break; trunk/MatroskaCodecIDs.cpp
r816 r842 779 779 780 780 case kAudioFormatAC3: 781 case kAudioFormatAC3MS:782 781 acl = ac3ChannelLayouts[channelIndex]; 783 782 break; … … 813 812 { kAudioFormatMPEGLayer2, 0x50 }, 814 813 { kAudioFormatMPEGLayer3, 0x55 }, 815 { kAudioFormatAC3 MS, 0x2000 },814 { kAudioFormatAC3, 0x2000 }, 816 815 { kAudioFormatDTS, 0x2001 }, 817 816 { kAudioFormatMPEG4AAC, 0xff }, … … 855 854 { kAudioFormatMPEGLayer2, "A_MPEG/L2" }, 856 855 { kAudioFormatMPEGLayer3, "A_MPEG/L3" }, 857 { kAudioFormatAC3 MS, "A_AC3" },856 { kAudioFormatAC3, "A_AC3" }, 858 857 { kAudioFormatAC3MS, "A_AC3" }, 859 858 // anything special for these two? 860 { kAudioFormatAC3 MS, "A_AC3/BSID9" },861 { kAudioFormatAC3 MS, "A_AC3/BSID10" },859 { kAudioFormatAC3, "A_AC3/BSID9" }, 860 { kAudioFormatAC3, "A_AC3/BSID10" }, 862 861 { kAudioFormatXiphVorbis, "A_VORBIS" }, 863 862 { kAudioFormatXiphFLAC, "A_FLAC" }, trunk/MatroskaImportPrivate.cpp
r806 r842 970 970 switch ((*desc)->dataFormat) { 971 971 case kAudioFormatAC3: 972 case kAudioFormatAC3MS:973 972 replaceSoundDesc = parse_ac3_bitstream(&asbd, &acl, block.GetBuffer(0).Buffer(), block.GetFrameSize(0)); 974 973 break; trunk/bitstream_info.c
r818 r842 12 12 #include <AudioToolbox/AudioToolbox.h> 13 13 #include <QuickTime/QuickTime.h> 14 #include "CodecIDs.h"15 14 16 15 #import "ac3tab.h" … … 33 32 return a < b ? a : b; 34 33 } 35 36 #define AV_RB16(x) ((((uint8_t*)(x))[0] << 8) | ((uint8_t*)(x))[1])37 34 38 35 static const int nfchans_tbl[8] = { 2, 1, 2, 3, 3, 4, 4, 5 }; … … 129 126 memset(asbd, 0, sizeof(AudioStreamBasicDescription)); 130 127 asbd->mSampleRate = sample_rate >> shift; 131 asbd->mFormatID = kAudioFormatAC3 MS;128 asbd->mFormatID = kAudioFormatAC3; 132 129 asbd->mFramesPerPacket = 1; 133 130 asbd->mChannelsPerFrame = nfchans_tbl[acmod] + lfe; … … 494 491 if(context->is_avc) 495 492 { 496 int i;497 493 if(buf_index >= buf_size) 498 494 break; 499 495 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 } 502 516 if(nalsize <= 1 || nalsize > buf_size) 503 517 { trunk/ff_private.c
r806 r842 320 320 break; 321 321 case CODEC_ID_AC3: 322 asbd->mFormatID = kAudioFormatAC3 MS;322 asbd->mFormatID = kAudioFormatAC3; 323 323 map->vbr = 1; 324 324 break;
