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
2c4fbd15
Commit
2c4fbd15
authored
Sep 14, 2022
by
Rémi Bernon
Committed by
Alexandre Julliard
Sep 15, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winegstreamer: Check WMA sample size before wrapping the sample.
parent
19df4f02
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
8 deletions
+7
-8
wma_decoder.c
dlls/winegstreamer/wma_decoder.c
+7
-8
No files found.
dlls/winegstreamer/wma_decoder.c
View file @
2c4fbd15
...
...
@@ -531,6 +531,7 @@ static HRESULT WINAPI transform_ProcessInput(IMFTransform *iface, DWORD id, IMFS
struct
wma_decoder
*
decoder
=
impl_from_IMFTransform
(
iface
);
struct
wg_sample
*
wg_sample
;
MFT_INPUT_STREAM_INFO
info
;
DWORD
total_length
;
HRESULT
hr
;
TRACE
(
"iface %p, id %lu, sample %p, flags %#lx.
\n
"
,
iface
,
id
,
sample
,
flags
);
...
...
@@ -538,18 +539,16 @@ static HRESULT WINAPI transform_ProcessInput(IMFTransform *iface, DWORD id, IMFS
if
(
!
decoder
->
wg_transform
)
return
MF_E_TRANSFORM_TYPE_NOT_SET
;
if
(
FAILED
(
hr
=
IMFTransform_GetInputStreamInfo
(
iface
,
0
,
&
info
)))
return
hr
;
if
(
FAILED
(
hr
=
wg_sample_create_mf
(
sample
,
&
wg_sample
)))
if
(
FAILED
(
hr
=
IMFTransform_GetInputStreamInfo
(
iface
,
0
,
&
info
))
||
FAILED
(
hr
=
IMFSample_GetTotalLength
(
sample
,
&
total_length
)))
return
hr
;
/* WMA transform uses fixed size input samples and ignores samples with invalid sizes */
if
(
wg_sample
->
size
%
info
.
cbSize
)
{
wg_sample_release
(
wg_sample
);
if
(
total_length
%
info
.
cbSize
)
return
S_OK
;
}
if
(
FAILED
(
hr
=
wg_sample_create_mf
(
sample
,
&
wg_sample
)))
return
hr
;
return
wg_transform_push_mf
(
decoder
->
wg_transform
,
wg_sample
,
decoder
->
wg_sample_queue
);
}
...
...
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