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
f1c74923
Commit
f1c74923
authored
Jun 24, 2019
by
Zebediah Figura
Committed by
Alexandre Julliard
Jun 25, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quartz/memallocator: Avoid using a magic value for the start media time.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
44318fee
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
8 deletions
+6
-8
memallocator.c
dlls/quartz/memallocator.c
+6
-8
No files found.
dlls/quartz/memallocator.c
View file @
f1c74923
...
@@ -40,6 +40,7 @@ typedef struct StdMediaSample2
...
@@ -40,6 +40,7 @@ typedef struct StdMediaSample2
struct
list
listentry
;
struct
list
listentry
;
LONGLONG
tMediaStart
;
LONGLONG
tMediaStart
;
LONGLONG
tMediaEnd
;
LONGLONG
tMediaEnd
;
BOOL
media_time_valid
;
}
StdMediaSample2
;
}
StdMediaSample2
;
typedef
struct
BaseMemAllocator
typedef
struct
BaseMemAllocator
...
@@ -74,8 +75,6 @@ static inline StdMediaSample2 *unsafe_impl_from_IMediaSample(IMediaSample * ifac
...
@@ -74,8 +75,6 @@ static inline StdMediaSample2 *unsafe_impl_from_IMediaSample(IMediaSample * ifac
#define AM_SAMPLE2_PROP_SIZE_WRITABLE FIELD_OFFSET(AM_SAMPLE2_PROPERTIES, pbBuffer)
#define AM_SAMPLE2_PROP_SIZE_WRITABLE FIELD_OFFSET(AM_SAMPLE2_PROPERTIES, pbBuffer)
#define INVALID_MEDIA_TIME (((ULONGLONG)0x7fffffff << 32) | 0xffffffff)
static
HRESULT
BaseMemAllocator_Init
(
HRESULT
(
*
fnAlloc
)(
IMemAllocator
*
),
static
HRESULT
BaseMemAllocator_Init
(
HRESULT
(
*
fnAlloc
)(
IMemAllocator
*
),
HRESULT
(
*
fnFree
)(
IMemAllocator
*
),
HRESULT
(
*
fnFree
)(
IMemAllocator
*
),
HRESULT
(
*
fnVerify
)(
IMemAllocator
*
,
ALLOCATOR_PROPERTIES
*
),
HRESULT
(
*
fnVerify
)(
IMemAllocator
*
,
ALLOCATOR_PROPERTIES
*
),
...
@@ -435,8 +434,7 @@ static HRESULT StdMediaSample2_Construct(BYTE * pbBuffer, LONG cbBuffer, IMemAll
...
@@ -435,8 +434,7 @@ static HRESULT StdMediaSample2_Construct(BYTE * pbBuffer, LONG cbBuffer, IMemAll
(
*
ppSample
)
->
props
.
cbData
=
sizeof
(
AM_SAMPLE2_PROPERTIES
);
(
*
ppSample
)
->
props
.
cbData
=
sizeof
(
AM_SAMPLE2_PROPERTIES
);
(
*
ppSample
)
->
props
.
cbBuffer
=
(
*
ppSample
)
->
props
.
lActual
=
cbBuffer
;
(
*
ppSample
)
->
props
.
cbBuffer
=
(
*
ppSample
)
->
props
.
lActual
=
cbBuffer
;
(
*
ppSample
)
->
props
.
pbBuffer
=
pbBuffer
;
(
*
ppSample
)
->
props
.
pbBuffer
=
pbBuffer
;
(
*
ppSample
)
->
tMediaStart
=
INVALID_MEDIA_TIME
;
(
*
ppSample
)
->
media_time_valid
=
FALSE
;
(
*
ppSample
)
->
tMediaEnd
=
0
;
return
S_OK
;
return
S_OK
;
}
}
...
@@ -496,8 +494,7 @@ static ULONG WINAPI StdMediaSample2_Release(IMediaSample2 * iface)
...
@@ -496,8 +494,7 @@ static ULONG WINAPI StdMediaSample2_Release(IMediaSample2 * iface)
DeleteMediaType
(
This
->
props
.
pMediaType
);
DeleteMediaType
(
This
->
props
.
pMediaType
);
This
->
props
.
pMediaType
=
NULL
;
This
->
props
.
pMediaType
=
NULL
;
This
->
props
.
dwSampleFlags
=
0
;
This
->
props
.
dwSampleFlags
=
0
;
This
->
tMediaStart
=
INVALID_MEDIA_TIME
;
This
->
media_time_valid
=
FALSE
;
This
->
tMediaEnd
=
0
;
if
(
This
->
pParent
)
if
(
This
->
pParent
)
IMemAllocator_ReleaseBuffer
(
This
->
pParent
,
(
IMediaSample
*
)
iface
);
IMemAllocator_ReleaseBuffer
(
This
->
pParent
,
(
IMediaSample
*
)
iface
);
...
@@ -725,7 +722,7 @@ static HRESULT WINAPI StdMediaSample2_GetMediaTime(IMediaSample2 * iface, LONGLO
...
@@ -725,7 +722,7 @@ static HRESULT WINAPI StdMediaSample2_GetMediaTime(IMediaSample2 * iface, LONGLO
TRACE
(
"(%p)->(%p, %p)
\n
"
,
iface
,
pStart
,
pEnd
);
TRACE
(
"(%p)->(%p, %p)
\n
"
,
iface
,
pStart
,
pEnd
);
if
(
This
->
tMediaStart
==
INVALID_MEDIA_TIME
)
if
(
!
This
->
media_time_valid
)
return
VFW_E_MEDIA_TIME_NOT_SET
;
return
VFW_E_MEDIA_TIME_NOT_SET
;
*
pStart
=
This
->
tMediaStart
;
*
pStart
=
This
->
tMediaStart
;
...
@@ -745,9 +742,10 @@ static HRESULT WINAPI StdMediaSample2_SetMediaTime(IMediaSample2 *iface, LONGLON
...
@@ -745,9 +742,10 @@ static HRESULT WINAPI StdMediaSample2_SetMediaTime(IMediaSample2 *iface, LONGLON
if
(
!
end
)
return
E_POINTER
;
if
(
!
end
)
return
E_POINTER
;
sample
->
tMediaStart
=
*
start
;
sample
->
tMediaStart
=
*
start
;
sample
->
tMediaEnd
=
*
end
;
sample
->
tMediaEnd
=
*
end
;
sample
->
media_time_valid
=
TRUE
;
}
}
else
else
sample
->
tMediaStart
=
INVALID_MEDIA_TIM
E
;
sample
->
media_time_valid
=
FALS
E
;
return
S_OK
;
return
S_OK
;
}
}
...
...
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