Loading media/libstagefright/WAVExtractor.cpp +3 −2 Original line number Diff line number Diff line Loading @@ -45,7 +45,7 @@ enum { }; static const char* WAVEEXT_SUBFORMAT = "\x00\x00\x00\x00\x10\x00\x80\x00\x00\xAA\x00\x38\x9B\x71"; static const char* AMBISONIC_SUBFORMAT = "\x00\x00\x21\x07\xD3\x11\x86\x44\xC8\xC1\xCA\x00\x00\x00"; static uint32_t U32_LE_AT(const uint8_t *ptr) { return ptr[3] << 24 | ptr[2] << 16 | ptr[1] << 8 | ptr[0]; Loading Loading @@ -248,7 +248,8 @@ status_t WAVExtractor::init() { // In a WAVE_EXT header, the first two bytes of the GUID stored at byte 24 contain // the sample format, using the same definitions as a regular WAV header mWaveFormat = U16_LE_AT(&formatSpec[24]); if (memcmp(&formatSpec[26], WAVEEXT_SUBFORMAT, 14)) { if (memcmp(&formatSpec[26], WAVEEXT_SUBFORMAT, 14) && memcmp(&formatSpec[26], AMBISONIC_SUBFORMAT, 14)) { ALOGE("unsupported GUID"); return ERROR_UNSUPPORTED; } Loading Loading
media/libstagefright/WAVExtractor.cpp +3 −2 Original line number Diff line number Diff line Loading @@ -45,7 +45,7 @@ enum { }; static const char* WAVEEXT_SUBFORMAT = "\x00\x00\x00\x00\x10\x00\x80\x00\x00\xAA\x00\x38\x9B\x71"; static const char* AMBISONIC_SUBFORMAT = "\x00\x00\x21\x07\xD3\x11\x86\x44\xC8\xC1\xCA\x00\x00\x00"; static uint32_t U32_LE_AT(const uint8_t *ptr) { return ptr[3] << 24 | ptr[2] << 16 | ptr[1] << 8 | ptr[0]; Loading Loading @@ -248,7 +248,8 @@ status_t WAVExtractor::init() { // In a WAVE_EXT header, the first two bytes of the GUID stored at byte 24 contain // the sample format, using the same definitions as a regular WAV header mWaveFormat = U16_LE_AT(&formatSpec[24]); if (memcmp(&formatSpec[26], WAVEEXT_SUBFORMAT, 14)) { if (memcmp(&formatSpec[26], WAVEEXT_SUBFORMAT, 14) && memcmp(&formatSpec[26], AMBISONIC_SUBFORMAT, 14)) { ALOGE("unsupported GUID"); return ERROR_UNSUPPORTED; } Loading