Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
41d6b67c
Commit
41d6b67c
authored
Oct 14, 2003
by
Michael Günnewig
Committed by
Alexandre Julliard
Oct 14, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed usage of GlobaReAlloc.
parent
9d2e0985
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
8 deletions
+31
-8
acmstream.c
dlls/avifil32/acmstream.c
+10
-4
avifile.c
dlls/avifil32/avifile.c
+21
-4
No files found.
dlls/avifil32/acmstream.c
View file @
41d6b67c
...
...
@@ -467,8 +467,11 @@ static HRESULT WINAPI ACMStream_fnRead(IAVIStream *iface, LONG start,
/* need bigger source buffer? */
if
(
This
->
acmStreamHdr
.
pbSrc
==
NULL
||
This
->
acmStreamHdr
.
dwSrcUser
<
size
)
{
This
->
acmStreamHdr
.
pbSrc
=
GlobalReAllocPtr
(
This
->
acmStreamHdr
.
pbSrc
,
size
,
GMEM_MOVEABLE
);
if
(
This
->
acmStreamHdr
.
pbSrc
==
NULL
)
This
->
acmStreamHdr
.
pbSrc
=
GlobalAllocPtr
(
GMEM_MOVEABLE
,
size
);
else
This
->
acmStreamHdr
.
pbSrc
=
GlobalReAllocPtr
(
This
->
acmStreamHdr
.
pbSrc
,
size
,
GMEM_MOVEABLE
);
if
(
This
->
acmStreamHdr
.
pbSrc
==
NULL
)
return
AVIERR_MEMORY
;
This
->
acmStreamHdr
.
dwSrcUser
=
size
;
...
...
@@ -568,8 +571,11 @@ static HRESULT WINAPI ACMStream_fnWrite(IAVIStream *iface, LONG start,
/* Need bigger destination buffer? */
if
(
This
->
acmStreamHdr
.
pbDst
==
NULL
||
This
->
acmStreamHdr
.
dwDstUser
<
size
)
{
This
->
acmStreamHdr
.
pbDst
=
GlobalReAllocPtr
(
This
->
acmStreamHdr
.
pbDst
,
size
,
GMEM_MOVEABLE
);
if
(
This
->
acmStreamHdr
.
pbDst
==
NULL
)
This
->
acmStreamHdr
.
pbDst
=
GlobalAllocPtr
(
GMEM_MOVEABLE
,
size
);
else
This
->
acmStreamHdr
.
pbDst
=
GlobalReAllocPtr
(
This
->
acmStreamHdr
.
pbDst
,
size
,
GMEM_MOVEABLE
);
if
(
This
->
acmStreamHdr
.
pbDst
==
NULL
)
return
AVIERR_MEMORY
;
This
->
acmStreamHdr
.
dwDstUser
=
size
;
...
...
dlls/avifil32/avifile.c
View file @
41d6b67c
...
...
@@ -1382,7 +1382,13 @@ static HRESULT AVIFILE_AddFrame(IAVIStreamImpl *This, DWORD ckid, DWORD size, DW
UINT
n
=
This
->
sInfo
.
dwFormatChangeCount
;
This
->
nIdxFmtChanges
+=
16
;
This
->
idxFmtChanges
=
GlobalReAllocPtr
(
This
->
idxFmtChanges
,
This
->
nIdxFmtChanges
*
sizeof
(
AVIINDEXENTRY
),
GHND
);
if
(
This
->
idxFmtChanges
==
NULL
)
This
->
idxFmtChanges
=
GlobalAllocPtr
(
GHND
,
This
->
nIdxFmtChanges
*
sizeof
(
AVIINDEXENTRY
));
else
This
->
idxFmtChanges
=
GlobalReAllocPtr
(
This
->
idxFmtChanges
,
This
->
nIdxFmtChanges
*
sizeof
(
AVIINDEXENTRY
),
GHND
);
if
(
This
->
idxFmtChanges
==
NULL
)
return
AVIERR_MEMORY
;
...
...
@@ -1413,7 +1419,13 @@ static HRESULT AVIFILE_AddFrame(IAVIStreamImpl *This, DWORD ckid, DWORD size, DW
/* get memory for index */
if
(
This
->
idxFrames
==
NULL
||
This
->
lLastFrame
+
1
>=
This
->
nIdxFrames
)
{
This
->
nIdxFrames
+=
512
;
This
->
idxFrames
=
GlobalReAllocPtr
(
This
->
idxFrames
,
This
->
nIdxFrames
*
sizeof
(
AVIINDEXENTRY
),
GHND
);
if
(
This
->
idxFrames
==
NULL
)
This
->
idxFrames
=
GlobalAllocPtr
(
GHND
,
This
->
nIdxFrames
*
sizeof
(
AVIINDEXENTRY
));
else
This
->
idxFrames
=
GlobalReAllocPtr
(
This
->
idxFrames
,
This
->
nIdxFrames
*
sizeof
(
AVIINDEXENTRY
),
GHND
);
if
(
This
->
idxFrames
==
NULL
)
return
AVIERR_MEMORY
;
}
...
...
@@ -2016,8 +2028,13 @@ static HRESULT AVIFILE_ReadBlock(IAVIStreamImpl *This, DWORD pos,
/* check that buffer is big enough -- don't trust dwSuggestedBufferSize */
if
(
This
->
lpBuffer
==
NULL
||
size
<
This
->
cbBuffer
)
{
This
->
lpBuffer
=
(
LPDWORD
)
GlobalReAllocPtr
(
This
->
lpBuffer
,
max
(
size
,
This
->
sInfo
.
dwSuggestedBufferSize
),
GMEM_MOVEABLE
);
DWORD
maxSize
=
max
(
size
,
This
->
sInfo
.
dwSuggestedBufferSize
);
if
(
This
->
lpBuffer
==
NULL
)
This
->
lpBuffer
=
(
LPDWORD
)
GlobalAllocPtr
(
GMEM_MOVEABLE
,
maxSize
);
else
This
->
lpBuffer
=
(
LPDWORD
)
GlobalReAllocPtr
(
This
->
lpBuffer
,
maxSize
,
GMEM_MOVEABLE
);
if
(
This
->
lpBuffer
==
NULL
)
return
AVIERR_MEMORY
;
This
->
cbBuffer
=
max
(
size
,
This
->
sInfo
.
dwSuggestedBufferSize
);
...
...
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