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
4bfd42ba
Commit
4bfd42ba
authored
Dec 03, 2019
by
Nikolay Sivov
Committed by
Alexandre Julliard
Dec 03, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mfplat: Use underlying stream access mode for bytestream capabilities.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
b0951ba8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
2 deletions
+19
-2
main.c
dlls/mfplat/main.c
+19
-2
No files found.
dlls/mfplat/main.c
View file @
4bfd42ba
...
...
@@ -2700,6 +2700,24 @@ static ULONG WINAPI bytestream_Release(IMFByteStream *iface)
return
refcount
;
}
static
HRESULT
WINAPI
bytestream_stream_GetCapabilities
(
IMFByteStream
*
iface
,
DWORD
*
capabilities
)
{
struct
bytestream
*
stream
=
impl_from_IMFByteStream
(
iface
);
STATSTG
stat
;
HRESULT
hr
;
TRACE
(
"%p, %p.
\n
"
,
iface
,
capabilities
);
if
(
FAILED
(
hr
=
IStream_Stat
(
stream
->
stream
,
&
stat
,
STATFLAG_NONAME
)))
return
hr
;
*
capabilities
=
MFBYTESTREAM_IS_READABLE
|
MFBYTESTREAM_IS_SEEKABLE
;
if
(
stat
.
grfMode
&
(
STGM_WRITE
|
STGM_READWRITE
))
*
capabilities
|=
MFBYTESTREAM_IS_WRITABLE
;
return
S_OK
;
}
static
HRESULT
WINAPI
bytestream_GetCapabilities
(
IMFByteStream
*
iface
,
DWORD
*
capabilities
)
{
struct
bytestream
*
stream
=
impl_from_IMFByteStream
(
iface
);
...
...
@@ -3060,7 +3078,7 @@ static const IMFByteStreamVtbl bytestream_stream_vtbl =
bytestream_QueryInterface
,
bytestream_AddRef
,
bytestream_Release
,
bytestream_GetCapabilities
,
bytestream_
stream_
GetCapabilities
,
bytestream_stream_GetLength
,
bytestream_stream_SetLength
,
bytestream_stream_GetCurrentPosition
,
...
...
@@ -3252,7 +3270,6 @@ HRESULT WINAPI MFCreateMFByteStreamOnStream(IStream *stream, IMFByteStream **byt
IStream_AddRef
(
object
->
stream
);
position
.
QuadPart
=
0
;
IStream_Seek
(
object
->
stream
,
position
,
STREAM_SEEK_SET
,
NULL
);
object
->
capabilities
=
MFBYTESTREAM_IS_READABLE
|
MFBYTESTREAM_IS_SEEKABLE
;
*
bytestream
=
&
object
->
IMFByteStream_iface
;
...
...
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