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
49762b16
Commit
49762b16
authored
May 01, 2012
by
Christian Costa
Committed by
Alexandre Julliard
May 04, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
amstream: Add checks to GetFormat.
parent
bde73d8d
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
6 deletions
+23
-6
mediastream.c
dlls/amstream/mediastream.c
+9
-6
amstream.c
dlls/amstream/tests/amstream.c
+14
-0
No files found.
dlls/amstream/mediastream.c
View file @
49762b16
...
...
@@ -159,13 +159,13 @@ static HRESULT WINAPI IDirectDrawMediaStreamImpl_SendEndOfStream(IDirectDrawMedi
/*** IDirectDrawMediaStream methods ***/
static
HRESULT
WINAPI
IDirectDrawMediaStreamImpl_GetFormat
(
IDirectDrawMediaStream
*
iface
,
DDSURFACEDESC
*
pDDSDCurrent
,
IDirectDrawPalette
**
ppDirectDrawP
alette
,
DDSURFACEDESC
*
pDDSDDesired
,
DWORD
*
pdwF
lags
)
DDSURFACEDESC
*
current_format
,
IDirectDrawPalette
**
p
alette
,
DDSURFACEDESC
*
desired_format
,
DWORD
*
f
lags
)
{
FIXME
(
"(%p)->(%p,%p,%p,%p) stub!
\n
"
,
iface
,
pDDSDCurrent
,
ppDirectDrawPalette
,
pDDSDDesired
,
pdwF
lags
);
FIXME
(
"(%p)->(%p,%p,%p,%p) stub!
\n
"
,
iface
,
current_format
,
palette
,
desired_format
,
f
lags
);
return
E_NOTIMPL
;
return
MS_E_NOSTREAM
;
}
...
...
@@ -390,7 +390,10 @@ static HRESULT WINAPI IAudioMediaStreamImpl_GetFormat(IAudioMediaStream *iface,
FIXME
(
"(%p/%p)->(%p) stub!
\n
"
,
iface
,
This
,
wave_format_current
);
return
E_NOTIMPL
;
if
(
!
wave_format_current
)
return
E_POINTER
;
return
MS_E_NOSTREAM
;
}
...
...
dlls/amstream/tests/amstream.c
View file @
49762b16
...
...
@@ -248,6 +248,13 @@ static void test_media_streams(void)
if
(
SUCCEEDED
(
hr
))
{
DDSURFACEDESC
current_format
,
desired_format
;
IDirectDrawPalette
*
palette
;
DWORD
flags
;
hr
=
IDirectDrawMediaStream_GetFormat
(
ddraw_stream
,
&
current_format
,
&
palette
,
&
desired_format
,
&
flags
);
ok
(
hr
==
MS_E_NOSTREAM
,
"IDirectDrawoMediaStream_GetFormat returned: %x
\n
"
,
hr
);
hr
=
IDirectDrawMediaStream_CreateSample
(
ddraw_stream
,
NULL
,
NULL
,
0
,
&
ddraw_sample
);
ok
(
hr
==
S_OK
,
"IDirectDrawMediaStream_CreateSample returned: %x
\n
"
,
hr
);
}
...
...
@@ -333,9 +340,16 @@ static void test_media_streams(void)
if
(
SUCCEEDED
(
hr
))
{
IAudioData
*
audio_data
=
NULL
;
WAVEFORMATEX
format
;
hr
=
CoCreateInstance
(
&
CLSID_AMAudioData
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IAudioData
,
(
void
**
)
&
audio_data
);
ok
(
hr
==
S_OK
,
"CoCreateInstance returned: %x
\n
"
,
hr
);
hr
=
IAudioMediaStream_GetFormat
(
audio_media_stream
,
NULL
);
ok
(
hr
==
E_POINTER
,
"IAudioMediaStream_GetFormat returned: %x
\n
"
,
hr
);
hr
=
IAudioMediaStream_GetFormat
(
audio_media_stream
,
&
format
);
ok
(
hr
==
MS_E_NOSTREAM
,
"IAudioMediaStream_GetFormat returned: %x
\n
"
,
hr
);
hr
=
IAudioMediaStream_CreateSample
(
audio_media_stream
,
NULL
,
0
,
&
audio_sample
);
ok
(
hr
==
E_POINTER
,
"IAudioMediaStream_CreateSample returned: %x
\n
"
,
hr
);
hr
=
IAudioMediaStream_CreateSample
(
audio_media_stream
,
audio_data
,
0
,
&
audio_sample
);
...
...
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