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
e7ef9fe2
Commit
e7ef9fe2
authored
May 27, 2021
by
Nikolay Sivov
Committed by
Alexandre Julliard
May 27, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
evr/mixer: Preserve output stream types order.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
eefce9dc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
22 deletions
+12
-22
mixer.c
dlls/evr/mixer.c
+12
-22
No files found.
dlls/evr/mixer.c
View file @
e7ef9fe2
...
...
@@ -642,13 +642,19 @@ done:
return
hr
;
}
static
int
__cdecl
rt_formats_sort_compare
(
const
void
*
left
,
const
void
*
right
)
static
void
video_mixer_append_rt_format
(
struct
rt_format
*
rt_formats
,
unsigned
int
*
count
,
const
GUID
*
device
,
D3DFORMAT
format
)
{
const
struct
rt_format
*
format1
=
left
,
*
format2
=
right
;
unsigned
int
i
;
if
(
format1
->
format
<
format2
->
format
)
return
-
1
;
if
(
format1
->
format
>
format2
->
format
)
return
1
;
return
0
;
for
(
i
=
0
;
i
<
*
count
;
++
i
)
{
if
(
rt_formats
[
i
].
format
==
format
)
return
;
}
rt_formats
[
*
count
].
format
=
format
;
rt_formats
[
*
count
].
device
=
*
device
;
*
count
+=
1
;
}
static
HRESULT
video_mixer_collect_output_types
(
struct
video_mixer
*
mixer
,
const
DXVA2_VideoDesc
*
video_desc
,
...
...
@@ -677,11 +683,7 @@ static HRESULT video_mixer_collect_output_types(struct video_mixer *mixer, const
rt_formats
=
ptr
;
for
(
j
=
0
;
j
<
format_count
;
++
j
)
{
rt_formats
[
count
+
j
].
format
=
formats
[
j
];
rt_formats
[
count
+
j
].
device
=
devices
[
i
];
}
count
+=
format_count
;
video_mixer_append_rt_format
(
rt_formats
,
&
count
,
&
devices
[
i
],
formats
[
j
]);
CoTaskMemFree
(
formats
);
}
...
...
@@ -689,18 +691,6 @@ static HRESULT video_mixer_collect_output_types(struct video_mixer *mixer, const
if
(
count
&&
!
(
flags
&
MFT_SET_TYPE_TEST_ONLY
))
{
qsort
(
rt_formats
,
count
,
sizeof
(
*
rt_formats
),
rt_formats_sort_compare
);
j
=
0
;
for
(
i
=
j
+
1
;
i
<
count
;
++
i
)
{
if
(
rt_formats
[
i
].
format
!=
rt_formats
[
j
].
format
)
{
rt_formats
[
++
j
]
=
rt_formats
[
i
];
}
}
count
=
j
+
1
;
memcpy
(
&
subtype
,
&
MFVideoFormat_Base
,
sizeof
(
subtype
));
if
((
mixer
->
output
.
rt_formats
=
calloc
(
count
,
sizeof
(
*
mixer
->
output
.
rt_formats
))))
{
...
...
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