avifil32: Remove superfluous pointer casts.
This commit is contained in:
parent
499603c360
commit
905ff8fdaa
|
@ -931,7 +931,7 @@ static HRESULT WINAPI IAVIStream_fnSetFormat(IAVIStream *iface, LONG pos,
|
|||
{
|
||||
IAVIStreamImpl *This = (IAVIStreamImpl *)iface;
|
||||
|
||||
LPBITMAPINFOHEADER lpbiNew = (LPBITMAPINFOHEADER)format;
|
||||
LPBITMAPINFOHEADER lpbiNew = format;
|
||||
|
||||
TRACE("(%p,%d,%p,%d)\n", iface, pos, format, formatsize);
|
||||
|
||||
|
@ -976,7 +976,7 @@ static HRESULT WINAPI IAVIStream_fnSetFormat(IAVIStream *iface, LONG pos,
|
|||
return AVIERR_OK;
|
||||
} else {
|
||||
MMCKINFO ck;
|
||||
LPBITMAPINFOHEADER lpbiOld = (LPBITMAPINFOHEADER)This->lpFormat;
|
||||
LPBITMAPINFOHEADER lpbiOld = This->lpFormat;
|
||||
RGBQUAD *rgbNew = (RGBQUAD*)((LPBYTE)lpbiNew + lpbiNew->biSize);
|
||||
AVIPALCHANGE *lppc = NULL;
|
||||
UINT n;
|
||||
|
@ -1688,7 +1688,7 @@ static HRESULT AVIFILE_LoadFile(IAVIFileImpl *This)
|
|||
return AVIERR_MEMORY;
|
||||
pStream->cbHandlerData = ck.cksize;
|
||||
|
||||
if (mmioRead(This->hmmio, (HPSTR)pStream->lpHandlerData, ck.cksize) != ck.cksize)
|
||||
if (mmioRead(This->hmmio, pStream->lpHandlerData, ck.cksize) != ck.cksize)
|
||||
return AVIERR_FILEREAD;
|
||||
break;
|
||||
case ckidSTREAMFORMAT:
|
||||
|
@ -1702,11 +1702,11 @@ static HRESULT AVIFILE_LoadFile(IAVIFileImpl *This)
|
|||
return AVIERR_MEMORY;
|
||||
pStream->cbFormat = ck.cksize;
|
||||
|
||||
if (mmioRead(This->hmmio, (HPSTR)pStream->lpFormat, ck.cksize) != ck.cksize)
|
||||
if (mmioRead(This->hmmio, pStream->lpFormat, ck.cksize) != ck.cksize)
|
||||
return AVIERR_FILEREAD;
|
||||
|
||||
if (pStream->sInfo.fccType == streamtypeVIDEO) {
|
||||
LPBITMAPINFOHEADER lpbi = (LPBITMAPINFOHEADER)pStream->lpFormat;
|
||||
LPBITMAPINFOHEADER lpbi = pStream->lpFormat;
|
||||
|
||||
/* some corrections to the video format */
|
||||
if (lpbi->biClrUsed == 0 && lpbi->biBitCount <= 8)
|
||||
|
@ -2059,7 +2059,7 @@ static HRESULT AVIFILE_ReadBlock(IAVIStreamImpl *This, DWORD pos,
|
|||
} else {
|
||||
if (mmioSeek(This->paf->hmmio, This->idxFrames[pos].dwChunkOffset + 2 * sizeof(DWORD), SEEK_SET) == -1)
|
||||
return AVIERR_FILEREAD;
|
||||
if (mmioRead(This->paf->hmmio, (HPSTR)buffer, size) != size)
|
||||
if (mmioRead(This->paf->hmmio, buffer, size) != size)
|
||||
return AVIERR_FILEREAD;
|
||||
}
|
||||
|
||||
|
@ -2206,7 +2206,7 @@ static HRESULT AVIFILE_SaveFile(IAVIFileImpl *This)
|
|||
if (mmioCreateChunk(This->hmmio, &ck, 0) != S_OK)
|
||||
return AVIERR_FILEWRITE;
|
||||
if (pStream->lpFormat != NULL && ck.cksize > 0) {
|
||||
if (mmioWrite(This->hmmio, (HPSTR)pStream->lpFormat, ck.cksize) != ck.cksize)
|
||||
if (mmioWrite(This->hmmio, pStream->lpFormat, ck.cksize) != ck.cksize)
|
||||
return AVIERR_FILEWRITE;
|
||||
}
|
||||
if (mmioAscend(This->hmmio, &ck, 0) != S_OK)
|
||||
|
@ -2218,7 +2218,7 @@ static HRESULT AVIFILE_SaveFile(IAVIFileImpl *This)
|
|||
ck.cksize = pStream->cbHandlerData;
|
||||
if (mmioCreateChunk(This->hmmio, &ck, 0) != S_OK)
|
||||
return AVIERR_FILEWRITE;
|
||||
if (mmioWrite(This->hmmio, (HPSTR)pStream->lpHandlerData, ck.cksize) != ck.cksize)
|
||||
if (mmioWrite(This->hmmio, pStream->lpHandlerData, ck.cksize) != ck.cksize)
|
||||
return AVIERR_FILEWRITE;
|
||||
if (mmioAscend(This->hmmio, &ck, 0) != S_OK)
|
||||
return AVIERR_FILEWRITE;
|
||||
|
@ -2227,7 +2227,7 @@ static HRESULT AVIFILE_SaveFile(IAVIFileImpl *This)
|
|||
/* ... some optional additional extra chunk for this stream ... */
|
||||
if (pStream->extra.lp != NULL && pStream->extra.cb > 0) {
|
||||
/* the chunk header(s) are already in the structure */
|
||||
if (mmioWrite(This->hmmio, (HPSTR)pStream->extra.lp, pStream->extra.cb) != pStream->extra.cb)
|
||||
if (mmioWrite(This->hmmio, pStream->extra.lp, pStream->extra.cb) != pStream->extra.cb)
|
||||
return AVIERR_FILEWRITE;
|
||||
}
|
||||
|
||||
|
@ -2302,7 +2302,7 @@ static HRESULT AVIFILE_SaveFile(IAVIFileImpl *This)
|
|||
/* write optional extra file chunks */
|
||||
if (This->fileextra.lp != NULL && This->fileextra.cb > 0) {
|
||||
/* as for the streams, are the chunk header(s) in the structure */
|
||||
if (mmioWrite(This->hmmio, (HPSTR)This->fileextra.lp, This->fileextra.cb) != This->fileextra.cb)
|
||||
if (mmioWrite(This->hmmio, This->fileextra.lp, This->fileextra.cb) != This->fileextra.cb)
|
||||
return AVIERR_FILEWRITE;
|
||||
}
|
||||
|
||||
|
@ -2562,7 +2562,7 @@ static HRESULT AVIFILE_WriteBlock(IAVIStreamImpl *This, DWORD block,
|
|||
if (mmioCreateChunk(This->paf->hmmio, &ck, 0) != S_OK)
|
||||
return AVIERR_FILEWRITE;
|
||||
if (buffer != NULL && size > 0) {
|
||||
if (mmioWrite(This->paf->hmmio, (HPSTR)buffer, size) != size)
|
||||
if (mmioWrite(This->paf->hmmio, buffer, size) != size)
|
||||
return AVIERR_FILEWRITE;
|
||||
}
|
||||
if (mmioAscend(This->paf->hmmio, &ck, 0) != S_OK)
|
||||
|
|
|
@ -538,7 +538,7 @@ static HRESULT WINAPI ICMStream_fnSetFormat(IAVIStream *iface, LONG pos,
|
|||
}
|
||||
} else {
|
||||
/* format change -- check that's only the palette */
|
||||
LPBITMAPINFOHEADER lpbi = (LPBITMAPINFOHEADER)format;
|
||||
LPBITMAPINFOHEADER lpbi = format;
|
||||
|
||||
if (lpbi->biSize != This->lpbiInput->biSize ||
|
||||
lpbi->biWidth != This->lpbiInput->biWidth ||
|
||||
|
|
|
@ -908,7 +908,7 @@ static HRESULT WINAPI IAVIStream_fnRead(IAVIStream *iface, LONG start,
|
|||
if (mmioSeek(This->hmmio, This->ckData.dwDataOffset
|
||||
+ start * This->sInfo.dwSampleSize, SEEK_SET) == -1)
|
||||
return AVIERR_FILEREAD;
|
||||
if (mmioRead(This->hmmio, (HPSTR)buffer, buffersize) != buffersize)
|
||||
if (mmioRead(This->hmmio, buffer, buffersize) != buffersize)
|
||||
return AVIERR_FILEREAD;
|
||||
|
||||
/* fill out return parameters if given */
|
||||
|
@ -960,7 +960,7 @@ static HRESULT WINAPI IAVIStream_fnWrite(IAVIStream *iface, LONG start,
|
|||
if (mmioSeek(This->hmmio, This->ckData.dwDataOffset +
|
||||
start * This->sInfo.dwSampleSize, SEEK_SET) == -1)
|
||||
return AVIERR_FILEWRITE;
|
||||
if (mmioWrite(This->hmmio, (HPSTR)buffer, buffersize) != buffersize)
|
||||
if (mmioWrite(This->hmmio, buffer, buffersize) != buffersize)
|
||||
return AVIERR_FILEWRITE;
|
||||
|
||||
This->sInfo.dwLength = max(This->sInfo.dwLength, (DWORD)start + samples);
|
||||
|
|
Loading…
Reference in New Issue