Changeset 37191 in vbox for trunk/src/VBox
- Timestamp:
- May 24, 2011 5:47:47 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/DevCodec.cpp
r37190 r37191 1836 1836 } 1837 1837 1838 static DECLCALLBACK(int)codecLoadV1(PCODECState pCodecState, PSSMHANDLE pSSMHandle, size_t cbOffset )1839 { 1840 size_t cbRawNodesV1 = (sizeof(CODECNODE) + cbOffset ) * pCodecState->cTotalNodes;1838 static DECLCALLBACK(int)codecLoadV1(PCODECState pCodecState, PSSMHANDLE pSSMHandle, size_t cbOffset, size_t alignment) 1839 { 1840 size_t cbRawNodesV1 = (sizeof(CODECNODE) + cbOffset + alignment) * pCodecState->cTotalNodes; 1841 1841 uint8_t *pu8RawNodesV1 = (uint8_t *)RTMemAlloc(cbRawNodesV1); 1842 1842 uint8_t *pu8NodeV1 = NULL; … … 1856 1856 pCodecState->pNodes[idxNode].node.id = pu8NodeV1[0]; 1857 1857 memcpy(pCodecState->pNodes[idxNode].node.au32F00_param, 1858 pu8NodeV1 + RT_OFFSETOF(CODECCOMMONNODE, au32F00_param) ,1858 pu8NodeV1 + RT_OFFSETOF(CODECCOMMONNODE, au32F00_param) + alignment, 1859 1859 sizeof(CODECNODE) - RT_OFFSETOF(CODECCOMMONNODE,au32F00_param)); 1860 1860 pu8NodeV1 += sizeof(CODECNODE) + cbOffset; … … 1872 1872 #if RT_ARCH_X86 1873 1873 if (SSMR3HandleHostBits(pSSMHandle) == 32) 1874 rc = codecLoadV1(pCodecState, pSSMHandle, sizeof(long) );1874 rc = codecLoadV1(pCodecState, pSSMHandle, sizeof(long), 0); 1875 1875 else 1876 rc = codecLoadV1(pCodecState, pSSMHandle, sizeof(uint64_t) );1876 rc = codecLoadV1(pCodecState, pSSMHandle, sizeof(uint64_t), 4); 1877 1877 #else 1878 1878 if (SSMR3HandleHostBits(pSSMHandle) == 64) 1879 rc = codecLoadV1(pCodecState, pSSMHandle, sizeof(long) );1879 rc = codecLoadV1(pCodecState, pSSMHandle, sizeof(long), 4); 1880 1880 else 1881 rc = codecLoadV1(pCodecState, pSSMHandle, sizeof(uint32_t) );1881 rc = codecLoadV1(pCodecState, pSSMHandle, sizeof(uint32_t), 0); 1882 1882 #endif 1883 1883 }
Note:
See TracChangeset
for help on using the changeset viewer.