Changeset 1128
- Timestamp:
- 08/27/09 12:04:50 (12 months ago)
- Files:
-
- 1 modified
-
trunk/MatroskaCodecIDs.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/MatroskaCodecIDs.cpp
r1088 r1128 379 379 }; 380 380 381 static bool ShouldWriteSBRExt(unsigned output_freq_index) 382 { 383 if (output_freq_index == 0) 384 return CFPreferencesGetAppBooleanValue(CFSTR("Allow96kSBR"), PERIAN_PREF_DOMAIN, NULL); 385 386 return true; 387 } 388 381 389 static int FindAACFreqIndex(double freq) 382 390 { … … 415 423 if (outputFreq) { 416 424 unsigned output_freq_index = FindAACFreqIndex(*outputFreq); 417 418 //SBR extension419 //not sure why we still use object type 2 (LC) instead of 5 (HE)420 *vosBuf++ = 0x56;421 *vosBuf++ = 0xE5;422 *vosBuf++ = 0x80 | (output_freq_index << 3);425 426 if (ShouldWriteSBRExt(output_freq_index)) { 427 *vosBuf++ = 0x56; 428 *vosBuf++ = 0xE5; 429 *vosBuf++ = 0x80 | (output_freq_index << 3); 430 } 423 431 } 424 432 … … 526 534 size_t esdsLen; 527 535 528 if (audio && !vosBuf) { 536 // vosLen > 2 means SBR; some of those must be rewritten to avoid QT bugs(?) 537 // FIXME remove when QT works with them 538 if (audio && (!vosBuf || vosLen > 2)) { 529 539 RecreateAACVOS(tr_entry, aacBuf, &vosLen); 530 540 vosBuf = aacBuf;
