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
9258d7ab
Commit
9258d7ab
authored
Jun 18, 2023
by
Rémi Bernon
Committed by
Alexandre Julliard
Jun 29, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winegstreamer: Pass the object context to media_source_create.
parent
cea4c846
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
media_source.c
dlls/winegstreamer/media_source.c
+6
-6
No files found.
dlls/winegstreamer/media_source.c
View file @
9258d7ab
...
...
@@ -1610,7 +1610,7 @@ static void media_source_init_descriptors(struct media_source *source)
}
}
static
HRESULT
media_source_create
(
IMFByteStream
*
bytestream
,
IMFMediaSource
**
out
)
static
HRESULT
media_source_create
(
struct
object_context
*
context
,
IMFMediaSource
**
out
)
{
unsigned
int
stream_count
=
UINT_MAX
;
struct
media_source
*
object
;
...
...
@@ -1620,7 +1620,7 @@ static HRESULT media_source_create(IMFByteStream *bytestream, IMFMediaSource **o
unsigned
int
i
;
HRESULT
hr
;
if
(
FAILED
(
hr
=
IMFByteStream_GetCapabilities
(
byte
stream
,
&
bytestream_caps
)))
if
(
FAILED
(
hr
=
IMFByteStream_GetCapabilities
(
context
->
stream
,
&
bytestream_caps
)))
return
hr
;
if
(
!
(
bytestream_caps
&
MFBYTESTREAM_IS_SEEKABLE
))
...
...
@@ -1629,7 +1629,7 @@ static HRESULT media_source_create(IMFByteStream *bytestream, IMFMediaSource **o
return
MF_E_BYTESTREAM_NOT_SEEKABLE
;
}
if
(
FAILED
(
hr
=
IMFByteStream_GetLength
(
byte
stream
,
&
file_size
)))
if
(
FAILED
(
hr
=
IMFByteStream_GetLength
(
context
->
stream
,
&
file_size
)))
{
FIXME
(
"Failed to get byte stream length, hr %#lx.
\n
"
,
hr
);
return
hr
;
...
...
@@ -1644,8 +1644,8 @@ static HRESULT media_source_create(IMFByteStream *bytestream, IMFMediaSource **o
object
->
IMFRateControl_iface
.
lpVtbl
=
&
media_source_rate_control_vtbl
;
object
->
async_commands_callback
.
lpVtbl
=
&
source_async_commands_callback_vtbl
;
object
->
ref
=
1
;
object
->
byte_stream
=
byte
stream
;
IMFByteStream_AddRef
(
byte
stream
);
object
->
byte_stream
=
context
->
stream
;
IMFByteStream_AddRef
(
context
->
stream
);
object
->
rate
=
1
.
0
f
;
InitializeCriticalSection
(
&
object
->
cs
);
object
->
cs
.
DebugInfo
->
Spare
[
0
]
=
(
DWORD_PTR
)(
__FILE__
": cs"
);
...
...
@@ -2003,7 +2003,7 @@ static HRESULT WINAPI stream_handler_callback_Invoke(IMFAsyncCallback *iface, IM
if
(
!
state
||
!
(
context
=
impl_from_IUnknown
(
state
)))
return
E_INVALIDARG
;
if
(
FAILED
(
hr
=
media_source_create
(
context
->
stream
,
(
IMFMediaSource
**
)
&
object
)))
if
(
FAILED
(
hr
=
media_source_create
(
context
,
(
IMFMediaSource
**
)
&
object
)))
WARN
(
"Failed to create media source, hr %#lx
\n
"
,
hr
);
else
{
...
...
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