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
0567f993
Commit
0567f993
authored
Apr 26, 2024
by
Rémi Bernon
Committed by
Alexandre Julliard
Apr 29, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winegstreamer: Always set aperture attributes on video decoder output types.
parent
73b6049c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
22 deletions
+16
-22
video_decoder.c
dlls/winegstreamer/video_decoder.c
+16
-22
No files found.
dlls/winegstreamer/video_decoder.c
View file @
0567f993
...
@@ -122,9 +122,9 @@ static HRESULT create_output_media_type(struct video_decoder *decoder, const GUI
...
@@ -122,9 +122,9 @@ static HRESULT create_output_media_type(struct video_decoder *decoder, const GUI
IMFMediaType
*
output_type
,
IMFMediaType
**
media_type
)
IMFMediaType
*
output_type
,
IMFMediaType
**
media_type
)
{
{
IMFMediaType
*
default_type
=
decoder
->
output_type
,
*
stream_type
=
output_type
?
output_type
:
decoder
->
stream_type
;
IMFMediaType
*
default_type
=
decoder
->
output_type
,
*
stream_type
=
output_type
?
output_type
:
decoder
->
stream_type
;
MFVideoArea
default_aperture
=
{{
0
}},
aperture
;
IMFVideoMediaType
*
video_type
;
IMFVideoMediaType
*
video_type
;
UINT32
value
,
width
,
height
;
UINT32
value
,
width
,
height
;
MFVideoArea
aperture
;
UINT64
ratio
;
UINT64
ratio
;
HRESULT
hr
;
HRESULT
hr
;
...
@@ -138,6 +138,9 @@ static HRESULT create_output_media_type(struct video_decoder *decoder, const GUI
...
@@ -138,6 +138,9 @@ static HRESULT create_output_media_type(struct video_decoder *decoder, const GUI
width
=
ratio
>>
32
;
width
=
ratio
>>
32
;
height
=
ratio
;
height
=
ratio
;
default_aperture
.
Area
.
cx
=
width
;
default_aperture
.
Area
.
cy
=
height
;
if
(
FAILED
(
IMFMediaType_GetUINT64
(
stream_type
,
&
MF_MT_FRAME_RATE
,
&
ratio
)))
if
(
FAILED
(
IMFMediaType_GetUINT64
(
stream_type
,
&
MF_MT_FRAME_RATE
,
&
ratio
)))
ratio
=
(
UINT64
)
30000
<<
32
|
1001
;
ratio
=
(
UINT64
)
30000
<<
32
|
1001
;
if
(
FAILED
(
hr
=
IMFVideoMediaType_SetUINT64
(
video_type
,
&
MF_MT_FRAME_RATE
,
ratio
)))
if
(
FAILED
(
hr
=
IMFVideoMediaType_SetUINT64
(
video_type
,
&
MF_MT_FRAME_RATE
,
ratio
)))
...
@@ -178,29 +181,20 @@ static HRESULT create_output_media_type(struct video_decoder *decoder, const GUI
...
@@ -178,29 +181,20 @@ static HRESULT create_output_media_type(struct video_decoder *decoder, const GUI
if
(
FAILED
(
hr
=
IMFVideoMediaType_SetUINT32
(
video_type
,
&
MF_MT_FIXED_SIZE_SAMPLES
,
value
)))
if
(
FAILED
(
hr
=
IMFVideoMediaType_SetUINT32
(
video_type
,
&
MF_MT_FIXED_SIZE_SAMPLES
,
value
)))
goto
done
;
goto
done
;
if
(
SUCCEEDED
(
IMFMediaType_GetBlob
(
stream_type
,
&
MF_MT_MINIMUM_DISPLAY_APERTURE
,
if
(
FAILED
(
IMFMediaType_GetBlob
(
stream_type
,
&
MF_MT_MINIMUM_DISPLAY_APERTURE
,
(
BYTE
*
)
&
aperture
,
sizeof
(
aperture
),
&
value
)))
(
BYTE
*
)
&
aperture
,
sizeof
(
aperture
),
&
value
)))
aperture
=
default_aperture
;
{
if
(
FAILED
(
hr
=
IMFVideoMediaType_SetBlob
(
video_type
,
&
MF_MT_MINIMUM_DISPLAY_APERTURE
,
(
BYTE
*
)
&
aperture
,
sizeof
(
aperture
))))
if
(
FAILED
(
hr
=
IMFVideoMediaType_SetBlob
(
video_type
,
&
MF_MT_MINIMUM_DISPLAY_APERTURE
,
goto
done
;
(
BYTE
*
)
&
aperture
,
sizeof
(
aperture
))))
goto
done
;
}
if
(
SUCCEEDED
(
IMFMediaType_GetBlob
(
stream_type
,
&
MF_MT_GEOMETRIC_APERTURE
,
if
(
FAILED
(
IMFMediaType_GetBlob
(
stream_type
,
&
MF_MT_GEOMETRIC_APERTURE
,
(
BYTE
*
)
&
aperture
,
sizeof
(
aperture
),
&
value
)))
(
BYTE
*
)
&
aperture
,
sizeof
(
aperture
),
&
value
)))
aperture
=
default_aperture
;
{
if
(
FAILED
(
hr
=
IMFVideoMediaType_SetBlob
(
video_type
,
&
MF_MT_GEOMETRIC_APERTURE
,
(
BYTE
*
)
&
aperture
,
sizeof
(
aperture
))))
if
(
FAILED
(
hr
=
IMFVideoMediaType_SetBlob
(
video_type
,
&
MF_MT_GEOMETRIC_APERTURE
,
goto
done
;
(
BYTE
*
)
&
aperture
,
sizeof
(
aperture
))))
goto
done
;
}
if
(
SUCCEEDED
(
IMFMediaType_GetBlob
(
stream_type
,
&
MF_MT_PAN_SCAN_APERTURE
,
if
(
FAILED
(
IMFMediaType_GetBlob
(
stream_type
,
&
MF_MT_PAN_SCAN_APERTURE
,
(
BYTE
*
)
&
aperture
,
sizeof
(
aperture
),
&
value
)))
(
BYTE
*
)
&
aperture
,
sizeof
(
aperture
),
&
value
)))
aperture
=
default_aperture
;
{
if
(
FAILED
(
hr
=
IMFVideoMediaType_SetBlob
(
video_type
,
&
MF_MT_PAN_SCAN_APERTURE
,
(
BYTE
*
)
&
aperture
,
sizeof
(
aperture
))))
if
(
FAILED
(
hr
=
IMFVideoMediaType_SetBlob
(
video_type
,
&
MF_MT_PAN_SCAN_APERTURE
,
goto
done
;
(
BYTE
*
)
&
aperture
,
sizeof
(
aperture
))))
goto
done
;
}
done:
done:
if
(
SUCCEEDED
(
hr
))
if
(
SUCCEEDED
(
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