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
17bab664
Commit
17bab664
authored
Dec 08, 2019
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Dec 09, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dmime: Fix index handling in segment GetParam().
Signed-off-by:
Michael Stefaniuc
<
mstefani@winehq.org
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
4649f2f1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
32 deletions
+19
-32
segment.c
dlls/dmime/segment.c
+19
-32
No files found.
dlls/dmime/segment.c
View file @
17bab664
...
...
@@ -368,49 +368,36 @@ static HRESULT WINAPI IDirectMusicSegment8Impl_RemoveNotificationType(IDirectMus
return
S_OK
;
}
static
HRESULT
WINAPI
IDirectMusicSegment8Impl_GetParam
(
IDirectMusicSegment8
*
iface
,
REFGUID
type
,
DWORD
group
,
DWORD
index
,
MUSIC_TIME
time
,
MUSIC_TIME
*
next
,
void
*
param
)
static
HRESULT
WINAPI
IDirectMusicSegment8Impl_GetParam
(
IDirectMusicSegment8
*
iface
,
REFGUID
type
,
DWORD
group
,
DWORD
index
,
MUSIC_TIME
time
,
MUSIC_TIME
*
next
,
void
*
param
)
{
IDirectMusicSegment8Impl
*
This
=
impl_from_IDirectMusicSegment8
(
iface
);
struct
list
*
item
;
IDirectMusicTrack
*
track
;
DMUS_PRIVATE_SEGMENT_TRACK
*
segment
;
HRESULT
hr
;
FIXME
(
"(%p, %s, 0x%x, %d, %d, %p, %p) Semi-stub
\n
"
,
This
,
debugstr_dmguid
(
type
),
group
,
index
,
time
,
next
,
param
);
unsigned
int
i
,
count
;
HRESULT
hr
=
DMUS_E_TRACK_NOT_FOUND
;
if
(
index
==
DMUS_SEG_ANYTRACK
||
group
==
0xffffffff
)
{
if
(
group
==
0xffffffff
&&
index
!=
DMUS_SEG_ANYTRACK
)
WARN
(
"Any group doesnt have DMUS_SEG_ANYTRACK index.
\n
"
);
TRACE
(
"(%p, %s, %#x, %u, %d, %p, %p)
\n
"
,
This
,
debugstr_dmguid
(
type
),
group
,
index
,
time
,
next
,
param
);
LIST_FOR_EACH
(
item
,
&
This
->
Tracks
)
{
segment
=
LIST_ENTRY
(
item
,
DMUS_PRIVATE_SEGMENT_TRACK
,
entry
);
TRACE
(
" - %p -> 0x%x,%p
\n
"
,
segment
,
segment
->
dwGroupBits
,
segment
->
pTrack
);
if
(
!
type
)
return
E_POINTER
;
if
(
group
!=
0xffffffff
&&
!
(
segment
->
dwGroupBits
&
group
))
continue
;
if
(
FAILED
(
IDirectMusicTrack_IsParamSupported
(
segment
->
pTrack
,
type
)))
/* Index is relative to the search pattern: group bits and supported param type */
for
(
i
=
0
,
count
=
0
;
i
<
DMUS_SEG_ANYTRACK
&&
count
<=
index
;
i
++
)
{
if
(
FAILED
(
IDirectMusicSegment8Impl_GetTrack
(
iface
,
&
GUID_NULL
,
group
,
i
,
&
track
)))
break
;
if
(
FAILED
(
IDirectMusicTrack_IsParamSupported
(
track
,
type
)))
continue
;
hr
=
IDirectMusicTrack_GetParam
(
segment
->
pTrack
,
type
,
time
,
next
,
param
);
if
(
index
==
count
||
index
==
DMUS_SEG_ANYTRACK
)
hr
=
IDirectMusicTrack_GetParam
(
track
,
type
,
time
,
next
,
param
);
IDirectMusicTrack_Release
(
track
);
if
(
SUCCEEDED
(
hr
))
return
hr
;
count
++
;
}
WARN
(
"(%p): not found
\n
"
,
This
);
return
DMUS_E_TRACK_NOT_FOUND
;
}
hr
=
IDirectMusicSegment8Impl_GetTrack
(
iface
,
&
GUID_NULL
,
group
,
index
,
&
track
);
if
(
FAILED
(
hr
))
{
ERR
(
"(%p): not found
\n
"
,
This
);
return
DMUS_E_TRACK_NOT_FOUND
;
}
hr
=
IDirectMusicTrack_GetParam
(
track
,
type
,
time
,
next
,
param
);
IDirectMusicTrack_Release
(
track
);
TRACE
(
"(%p): not found
\n
"
,
This
);
return
hr
;
}
...
...
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