Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
905ff8fd
Commit
905ff8fd
authored
Jan 27, 2009
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Jan 27, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avifil32: Remove superfluous pointer casts.
parent
499603c3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
14 deletions
+14
-14
avifile.c
dlls/avifil32/avifile.c
+11
-11
icmstream.c
dlls/avifil32/icmstream.c
+1
-1
wavfile.c
dlls/avifil32/wavfile.c
+2
-2
No files found.
dlls/avifil32/avifile.c
View file @
905ff8fd
...
...
@@ -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
)
...
...
dlls/avifil32/icmstream.c
View file @
905ff8fd
...
...
@@ -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
||
...
...
dlls/avifil32/wavfile.c
View file @
905ff8fd
...
...
@@ -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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment