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
437bc14a
Commit
437bc14a
authored
Apr 08, 2021
by
Nikolay Sivov
Committed by
Alexandre Julliard
Apr 08, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mfreadwrite: Use CRT functions for heap allocations.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
e3f3e2d3
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
13 deletions
+11
-13
reader.c
dlls/mfreadwrite/reader.c
+8
-9
writer.c
dlls/mfreadwrite/writer.c
+3
-4
No files found.
dlls/mfreadwrite/reader.c
View file @
437bc14a
...
...
@@ -38,7 +38,6 @@
#include "dxva2api.h"
#include "wine/debug.h"
#include "wine/heap.h"
#include "wine/list.h"
#include "mf_private.h"
...
...
@@ -263,7 +262,7 @@ static ULONG WINAPI source_reader_async_command_Release(IUnknown *iface)
{
if
(
command
->
op
==
SOURCE_READER_ASYNC_SEEK
)
PropVariantClear
(
&
command
->
u
.
seek
.
position
);
heap_
free
(
command
);
free
(
command
);
}
return
refcount
;
...
...
@@ -280,7 +279,7 @@ static HRESULT source_reader_create_async_op(enum source_reader_async_op op, str
{
struct
source_reader_async_command
*
command
;
if
(
!
(
command
=
heap_alloc_zero
(
sizeof
(
*
command
))))
if
(
!
(
command
=
calloc
(
1
,
sizeof
(
*
command
))))
return
E_OUTOFMEMORY
;
command
->
IUnknown_iface
.
lpVtbl
=
&
source_reader_async_command_vtbl
;
...
...
@@ -448,7 +447,7 @@ static void source_reader_queue_response(struct source_reader *reader, struct me
{
struct
stream_response
*
response
;
response
=
heap_alloc_zero
(
sizeof
(
*
response
));
response
=
calloc
(
1
,
sizeof
(
*
response
));
response
->
status
=
status
;
response
->
stream_index
=
stream
->
index
;
response
->
stream_flags
=
stream_flags
;
...
...
@@ -973,7 +972,7 @@ static void source_reader_release_response(struct stream_response *response)
{
if
(
response
->
sample
)
IMFSample_Release
(
response
->
sample
);
heap_
free
(
response
);
free
(
response
);
}
static
HRESULT
source_reader_get_stream_selection
(
const
struct
source_reader
*
reader
,
DWORD
index
,
BOOL
*
selected
)
...
...
@@ -1395,10 +1394,10 @@ static ULONG WINAPI src_reader_Release(IMFSourceReader *iface)
IMFVideoSampleAllocatorEx_Release
(
stream
->
allocator
);
}
source_reader_release_responses
(
reader
,
NULL
);
heap_
free
(
reader
->
streams
);
free
(
reader
->
streams
);
MFUnlockWorkQueue
(
reader
->
queue
);
DeleteCriticalSection
(
&
reader
->
cs
);
heap_
free
(
reader
);
free
(
reader
);
}
return
refcount
;
...
...
@@ -2287,7 +2286,7 @@ static HRESULT create_source_reader_from_source(IMFMediaSource *source, IMFAttri
unsigned
int
i
;
HRESULT
hr
;
object
=
heap_alloc_zero
(
sizeof
(
*
object
));
object
=
calloc
(
1
,
sizeof
(
*
object
));
if
(
!
object
)
return
E_OUTOFMEMORY
;
...
...
@@ -2311,7 +2310,7 @@ static HRESULT create_source_reader_from_source(IMFMediaSource *source, IMFAttri
if
(
FAILED
(
hr
=
IMFPresentationDescriptor_GetStreamDescriptorCount
(
object
->
descriptor
,
&
object
->
stream_count
)))
goto
failed
;
if
(
!
(
object
->
streams
=
heap_alloc_zero
(
object
->
stream_count
*
sizeof
(
*
object
->
streams
))))
if
(
!
(
object
->
streams
=
calloc
(
object
->
stream_count
,
sizeof
(
*
object
->
streams
))))
{
hr
=
E_OUTOFMEMORY
;
goto
failed
;
...
...
dlls/mfreadwrite/writer.c
View file @
437bc14a
...
...
@@ -25,7 +25,6 @@
#include "mf_private.h"
#include "wine/debug.h"
#include "wine/heap.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
mfplat
);
...
...
@@ -76,7 +75,7 @@ static ULONG WINAPI sink_writer_Release(IMFSinkWriter *iface)
if
(
!
refcount
)
{
heap_
free
(
writer
);
free
(
writer
);
}
return
refcount
;
...
...
@@ -185,7 +184,7 @@ HRESULT create_sink_writer_from_sink(IMFMediaSink *sink, IMFAttributes *attribut
struct
sink_writer
*
object
;
HRESULT
hr
;
object
=
heap_
alloc
(
sizeof
(
*
object
));
object
=
m
alloc
(
sizeof
(
*
object
));
if
(
!
object
)
return
E_OUTOFMEMORY
;
...
...
@@ -203,7 +202,7 @@ HRESULT create_sink_writer_from_stream(IMFByteStream *stream, IMFAttributes *att
struct
sink_writer
*
object
;
HRESULT
hr
;
object
=
heap_
alloc
(
sizeof
(
*
object
));
object
=
m
alloc
(
sizeof
(
*
object
));
if
(
!
object
)
return
E_OUTOFMEMORY
;
...
...
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