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
9262c55a
Commit
9262c55a
authored
Jul 03, 2012
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Jul 03, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quartz: Use unsafe_impl_from_IMediaSample() instead of a cast.
parent
f557ed6f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
2 deletions
+13
-2
memallocator.c
dlls/quartz/memallocator.c
+13
-2
No files found.
dlls/quartz/memallocator.c
View file @
9262c55a
...
@@ -70,6 +70,7 @@ static inline BaseMemAllocator *impl_from_IMemAllocator(IMemAllocator *iface)
...
@@ -70,6 +70,7 @@ static inline BaseMemAllocator *impl_from_IMemAllocator(IMemAllocator *iface)
static
const
IMemAllocatorVtbl
BaseMemAllocator_VTable
;
static
const
IMemAllocatorVtbl
BaseMemAllocator_VTable
;
static
const
IMediaSample2Vtbl
StdMediaSample2_VTable
;
static
const
IMediaSample2Vtbl
StdMediaSample2_VTable
;
static
inline
StdMediaSample2
*
unsafe_impl_from_IMediaSample
(
IMediaSample
*
iface
);
#define AM_SAMPLE2_PROP_SIZE_WRITABLE FIELD_OFFSET(AM_SAMPLE2_PROPERTIES, pbBuffer)
#define AM_SAMPLE2_PROP_SIZE_WRITABLE FIELD_OFFSET(AM_SAMPLE2_PROPERTIES, pbBuffer)
...
@@ -356,9 +357,9 @@ static HRESULT WINAPI BaseMemAllocator_GetBuffer(IMemAllocator * iface, IMediaSa
...
@@ -356,9 +357,9 @@ static HRESULT WINAPI BaseMemAllocator_GetBuffer(IMemAllocator * iface, IMediaSa
static
HRESULT
WINAPI
BaseMemAllocator_ReleaseBuffer
(
IMemAllocator
*
iface
,
IMediaSample
*
pSample
)
static
HRESULT
WINAPI
BaseMemAllocator_ReleaseBuffer
(
IMemAllocator
*
iface
,
IMediaSample
*
pSample
)
{
{
BaseMemAllocator
*
This
=
impl_from_IMemAllocator
(
iface
);
BaseMemAllocator
*
This
=
impl_from_IMemAllocator
(
iface
);
StdMediaSample2
*
pStdSample
=
(
StdMediaSample2
*
)
pSample
;
StdMediaSample2
*
pStdSample
=
unsafe_impl_from_IMediaSample
(
pSample
)
;
HRESULT
hr
=
S_OK
;
HRESULT
hr
=
S_OK
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
pSample
);
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
pSample
);
/* FIXME: make sure that sample is currently on the used list */
/* FIXME: make sure that sample is currently on the used list */
...
@@ -791,6 +792,16 @@ static const IMediaSample2Vtbl StdMediaSample2_VTable =
...
@@ -791,6 +792,16 @@ static const IMediaSample2Vtbl StdMediaSample2_VTable =
StdMediaSample2_SetProperties
StdMediaSample2_SetProperties
};
};
static
inline
StdMediaSample2
*
unsafe_impl_from_IMediaSample
(
IMediaSample
*
iface
)
{
IMediaSample2
*
iface2
=
(
IMediaSample2
*
)
iface
;
if
(
!
iface
)
return
NULL
;
assert
(
iface2
->
lpVtbl
==
&
StdMediaSample2_VTable
);
return
impl_from_IMediaSample2
(
iface2
);
}
typedef
struct
StdMemAllocator
typedef
struct
StdMemAllocator
{
{
BaseMemAllocator
base
;
BaseMemAllocator
base
;
...
...
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