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
9a591bf4
Commit
9a591bf4
authored
Feb 20, 2024
by
Rémi Bernon
Committed by
Alexandre Julliard
Feb 21, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winegstreamer: Use MFCalculateImageSize to compute output info size.
parent
39e59267
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
2 deletions
+20
-2
h264_decoder.c
dlls/winegstreamer/h264_decoder.c
+20
-2
No files found.
dlls/winegstreamer/h264_decoder.c
View file @
9a591bf4
...
...
@@ -397,6 +397,23 @@ static HRESULT WINAPI transform_GetOutputAvailableType(IMFTransform *iface, DWOR
return
create_output_media_type
(
decoder
,
decoder
->
output_types
[
index
],
NULL
,
type
);
}
static
HRESULT
update_output_info_size
(
struct
h264_decoder
*
decoder
,
UINT32
width
,
UINT32
height
)
{
HRESULT
hr
=
E_FAIL
;
UINT32
i
,
size
;
decoder
->
output_info
.
cbSize
=
0
;
for
(
i
=
0
;
i
<
decoder
->
output_type_count
;
++
i
)
{
if
(
FAILED
(
hr
=
MFCalculateImageSize
(
decoder
->
output_types
[
i
],
width
,
height
,
&
size
)))
return
hr
;
decoder
->
output_info
.
cbSize
=
max
(
size
,
decoder
->
output_info
.
cbSize
);
}
return
hr
;
}
static
HRESULT
WINAPI
transform_SetInputType
(
IMFTransform
*
iface
,
DWORD
id
,
IMFMediaType
*
type
,
DWORD
flags
)
{
struct
h264_decoder
*
decoder
=
impl_from_IMFTransform
(
iface
);
...
...
@@ -436,7 +453,7 @@ static HRESULT WINAPI transform_SetInputType(IMFTransform *iface, DWORD id, IMFM
{
if
(
FAILED
(
hr
=
IMFMediaType_SetUINT64
(
decoder
->
stream_type
,
&
MF_MT_FRAME_SIZE
,
frame_size
)))
WARN
(
"Failed to update stream type frame size, hr %#lx
\n
"
,
hr
);
decoder
->
output_info
.
cbSize
=
(
frame_size
>>
32
)
*
(
UINT32
)
frame_size
*
2
;
return
update_output_info_size
(
decoder
,
frame_size
>>
32
,
frame_size
)
;
}
return
S_OK
;
...
...
@@ -654,7 +671,8 @@ static HRESULT handle_stream_type_change(struct h264_decoder *decoder, const str
if
(
FAILED
(
hr
=
IMFMediaType_GetUINT64
(
decoder
->
stream_type
,
&
MF_MT_FRAME_SIZE
,
&
frame_size
)))
return
hr
;
decoder
->
output_info
.
cbSize
=
(
frame_size
>>
32
)
*
(
UINT32
)
frame_size
*
2
;
if
(
FAILED
(
hr
=
update_output_info_size
(
decoder
,
frame_size
>>
32
,
frame_size
)))
return
hr
;
uninit_allocator
(
decoder
);
return
MF_E_TRANSFORM_STREAM_CHANGE
;
...
...
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