[MPlayer-cvslog] r38230 - trunk/libao2/ao_dsound.c
reimar
subversion at mplayerhq.hu
Fri Jan 22 00:54:42 EET 2021
Author: reimar
Date: Fri Jan 22 00:54:41 2021
New Revision: 38230
Log:
ao_dsound.c: Avoid pointer arithmetic on void * type.
Modified:
trunk/libao2/ao_dsound.c
Modified: trunk/libao2/ao_dsound.c
==============================================================================
--- trunk/libao2/ao_dsound.c Fri Jan 22 00:48:36 2021 (r38229)
+++ trunk/libao2/ao_dsound.c Fri Jan 22 00:54:41 2021 (r38230)
@@ -330,14 +330,14 @@ static int write_buffer(unsigned char *d
numsamp = dwBytes1 / (ao_data.channels * sampsize); // number of samples for each channel in this buffer
for( i = 0; i < numsamp; i++ ) for( j = 0; j < ao_data.channels; j++ ) {
- memcpy(lpvPtr1+(i*ao_data.channels*sampsize)+(chantable[j]*sampsize),data+(i*ao_data.channels*sampsize)+(j*sampsize),sampsize);
+ memcpy((char *)lpvPtr1+(i*ao_data.channels*sampsize)+(chantable[j]*sampsize),data+(i*ao_data.channels*sampsize)+(j*sampsize),sampsize);
}
if (NULL != lpvPtr2 )
{
numsamp = dwBytes2 / (ao_data.channels * sampsize);
for( i = 0; i < numsamp; i++ ) for( j = 0; j < ao_data.channels; j++ ) {
- memcpy(lpvPtr2+(i*ao_data.channels*sampsize)+(chantable[j]*sampsize),data+dwBytes1+(i*ao_data.channels*sampsize)+(j*sampsize),sampsize);
+ memcpy((char *)lpvPtr2+(i*ao_data.channels*sampsize)+(chantable[j]*sampsize),data+dwBytes1+(i*ao_data.channels*sampsize)+(j*sampsize),sampsize);
}
}
More information about the MPlayer-cvslog
mailing list