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
73bc4e67
Commit
73bc4e67
authored
Mar 04, 2006
by
Mike McCormack
Committed by
Alexandre Julliard
Mar 04, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avifil32: Eliminate some gcc 4.1 warnings caused by windowsx.h macros.
parent
c3a12517
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
15 deletions
+26
-15
acmstream.c
dlls/avifil32/acmstream.c
+26
-15
No files found.
dlls/avifil32/acmstream.c
View file @
73bc4e67
...
...
@@ -26,7 +26,6 @@
#include "winuser.h"
#include "winnls.h"
#include "winerror.h"
#include "windowsx.h"
#include "mmsystem.h"
#include "vfw.h"
#include "msacm.h"
...
...
@@ -177,20 +176,24 @@ static ULONG WINAPI ACMStream_fnRelease(IAVIStream* iface)
This
->
has
=
NULL
;
}
if
(
This
->
acmStreamHdr
.
pbSrc
!=
NULL
)
{
GlobalFreePtr
(
This
->
acmStreamHdr
.
pbSrc
);
GlobalUnlock
(
GlobalHandle
(
This
->
acmStreamHdr
.
pbSrc
));
GlobalFree
(
GlobalHandle
(
This
->
acmStreamHdr
.
pbSrc
));
This
->
acmStreamHdr
.
pbSrc
=
NULL
;
}
if
(
This
->
acmStreamHdr
.
pbDst
!=
NULL
)
{
GlobalFreePtr
(
This
->
acmStreamHdr
.
pbDst
);
GlobalUnlock
(
GlobalHandle
(
This
->
acmStreamHdr
.
pbDst
));
GlobalFree
(
GlobalHandle
(
This
->
acmStreamHdr
.
pbDst
));
This
->
acmStreamHdr
.
pbDst
=
NULL
;
}
if
(
This
->
lpInFormat
!=
NULL
)
{
GlobalFreePtr
(
This
->
lpInFormat
);
GlobalUnlock
(
GlobalHandle
(
This
->
lpInFormat
));
GlobalFree
(
GlobalHandle
(
This
->
lpInFormat
));
This
->
lpInFormat
=
NULL
;
This
->
cbInFormat
=
0
;
}
if
(
This
->
lpOutFormat
!=
NULL
)
{
GlobalFreePtr
(
This
->
lpOutFormat
);
GlobalUnlock
(
GlobalHandle
(
This
->
lpOutFormat
));
GlobalFree
(
GlobalHandle
(
This
->
lpOutFormat
));
This
->
lpOutFormat
=
NULL
;
This
->
cbOutFormat
=
0
;
}
...
...
@@ -250,7 +253,7 @@ static HRESULT WINAPI ACMStream_fnCreate(IAVIStream *iface, LPARAM lParam1,
else
This
->
cbOutFormat
=
sizeof
(
PCMWAVEFORMAT
);
This
->
lpOutFormat
=
(
LPWAVEFORMATEX
)
GlobalAllocPtr
(
GHND
,
This
->
cbOutFormat
);
This
->
lpOutFormat
=
GlobalLock
(
GlobalAlloc
(
GHND
,
This
->
cbOutFormat
)
);
if
(
This
->
lpOutFormat
==
NULL
)
return
AVIERR_MEMORY
;
...
...
@@ -383,7 +386,7 @@ static HRESULT WINAPI ACMStream_fnSetFormat(IAVIStream *iface, LONG pos,
if
((
This
->
sInfo
.
dwCaps
&
AVIFILECAPS_CANWRITE
)
==
0
)
return
AVIERR_READONLY
;
This
->
lpInFormat
=
(
LPWAVEFORMATEX
)
GlobalAllocPtr
(
GMEM_MOVEABLE
,
formatsize
);
This
->
lpInFormat
=
GlobalLock
(
GlobalAlloc
(
GMEM_MOVEABLE
,
formatsize
)
);
if
(
This
->
lpInFormat
==
NULL
)
return
AVIERR_MEMORY
;
This
->
cbInFormat
=
formatsize
;
...
...
@@ -463,7 +466,8 @@ static HRESULT WINAPI ACMStream_fnRead(IAVIStream *iface, LONG start,
/* Need to free destination buffer used for writing? */
if
(
This
->
acmStreamHdr
.
pbDst
!=
NULL
)
{
GlobalFreePtr
(
This
->
acmStreamHdr
.
pbDst
);
GlobalUnlock
(
GlobalHandle
(
This
->
acmStreamHdr
.
pbDst
));
GlobalFree
(
GlobalHandle
(
This
->
acmStreamHdr
.
pbDst
));
This
->
acmStreamHdr
.
pbDst
=
NULL
;
This
->
acmStreamHdr
.
dwDstUser
=
0
;
}
...
...
@@ -472,10 +476,13 @@ static HRESULT WINAPI ACMStream_fnRead(IAVIStream *iface, LONG start,
if
(
This
->
acmStreamHdr
.
pbSrc
==
NULL
||
This
->
acmStreamHdr
.
dwSrcUser
<
size
)
{
if
(
This
->
acmStreamHdr
.
pbSrc
==
NULL
)
This
->
acmStreamHdr
.
pbSrc
=
Global
AllocPtr
(
GMEM_MOVEABLE
,
size
);
This
->
acmStreamHdr
.
pbSrc
=
Global
Lock
(
GlobalAlloc
(
GMEM_MOVEABLE
,
size
)
);
else
This
->
acmStreamHdr
.
pbSrc
=
GlobalReAllocPtr
(
This
->
acmStreamHdr
.
pbSrc
,
{
GlobalUnlock
(
GlobalHandle
(
This
->
acmStreamHdr
.
pbSrc
));
This
->
acmStreamHdr
.
pbDst
=
GlobalReAlloc
(
GlobalHandle
(
This
->
acmStreamHdr
.
pbSrc
),
size
,
GMEM_MOVEABLE
);
}
if
(
This
->
acmStreamHdr
.
pbSrc
==
NULL
)
return
AVIERR_MEMORY
;
This
->
acmStreamHdr
.
dwSrcUser
=
size
;
...
...
@@ -567,7 +574,8 @@ static HRESULT WINAPI ACMStream_fnWrite(IAVIStream *iface, LONG start,
/* Need to free source buffer used for reading? */
if
(
This
->
acmStreamHdr
.
pbSrc
!=
NULL
)
{
GlobalFreePtr
(
This
->
acmStreamHdr
.
pbSrc
);
GlobalUnlock
(
GlobalHandle
(
This
->
acmStreamHdr
.
pbSrc
));
GlobalFree
(
GlobalHandle
(
This
->
acmStreamHdr
.
pbSrc
));
This
->
acmStreamHdr
.
pbSrc
=
NULL
;
This
->
acmStreamHdr
.
dwSrcUser
=
0
;
}
...
...
@@ -576,10 +584,13 @@ static HRESULT WINAPI ACMStream_fnWrite(IAVIStream *iface, LONG start,
if
(
This
->
acmStreamHdr
.
pbDst
==
NULL
||
This
->
acmStreamHdr
.
dwDstUser
<
size
)
{
if
(
This
->
acmStreamHdr
.
pbDst
==
NULL
)
This
->
acmStreamHdr
.
pbDst
=
Global
AllocPtr
(
GMEM_MOVEABLE
,
size
);
This
->
acmStreamHdr
.
pbDst
=
Global
Lock
(
GlobalAlloc
(
GMEM_MOVEABLE
,
size
)
);
else
This
->
acmStreamHdr
.
pbDst
=
GlobalReAllocPtr
(
This
->
acmStreamHdr
.
pbDst
,
{
GlobalUnlock
(
GlobalHandle
(
This
->
acmStreamHdr
.
pbDst
));
This
->
acmStreamHdr
.
pbDst
=
GlobalReAlloc
(
GlobalHandle
(
This
->
acmStreamHdr
.
pbDst
),
size
,
GMEM_MOVEABLE
);
}
if
(
This
->
acmStreamHdr
.
pbDst
==
NULL
)
return
AVIERR_MEMORY
;
This
->
acmStreamHdr
.
dwDstUser
=
size
;
...
...
@@ -703,7 +714,7 @@ static HRESULT AVIFILE_OpenCompressor(IAVIStreamImpl *This)
hr
=
AVIStreamFormatSize
(
This
->
pStream
,
This
->
sInfo
.
dwStart
,
&
This
->
cbInFormat
);
if
(
FAILED
(
hr
))
return
hr
;
This
->
lpInFormat
=
(
LPWAVEFORMATEX
)
GlobalAllocPtr
(
GMEM_MOVEABLE
,
This
->
cbInFormat
);
This
->
lpInFormat
=
GlobalLock
(
GlobalAlloc
(
GMEM_MOVEABLE
,
This
->
cbInFormat
)
);
if
(
This
->
lpInFormat
==
NULL
)
return
AVIERR_MEMORY
;
...
...
@@ -715,7 +726,7 @@ static HRESULT AVIFILE_OpenCompressor(IAVIStreamImpl *This)
if
(
This
->
lpOutFormat
==
NULL
)
{
/* we must decode to default format */
This
->
cbOutFormat
=
sizeof
(
PCMWAVEFORMAT
);
This
->
lpOutFormat
=
(
LPWAVEFORMATEX
)
GlobalAllocPtr
(
GHND
,
This
->
cbOutFormat
);
This
->
lpOutFormat
=
GlobalLock
(
GlobalAlloc
(
GHND
,
This
->
cbOutFormat
)
);
if
(
This
->
lpOutFormat
==
NULL
)
return
AVIERR_MEMORY
;
...
...
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