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
9add2332
Commit
9add2332
authored
Nov 04, 2022
by
Anton Baskanov
Committed by
Alexandre Julliard
Nov 23, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winegstreamer: Allocate at least 3 buffers for MPEG audio in quartz parser.
parent
dfb16162
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
quartz_parser.c
dlls/winegstreamer/quartz_parser.c
+9
-1
No files found.
dlls/winegstreamer/quartz_parser.c
View file @
9add2332
...
...
@@ -1649,6 +1649,7 @@ static HRESULT WINAPI GSTOutPin_DecideBufferSize(struct strmbase_source *iface,
IMemAllocator
*
allocator
,
ALLOCATOR_PROPERTIES
*
props
)
{
struct
parser_source
*
pin
=
impl_source_from_IPin
(
&
iface
->
pin
.
IPin_iface
);
unsigned
int
buffer_count
=
1
;
unsigned
int
buffer_size
=
16384
;
ALLOCATOR_PROPERTIES
ret_props
;
...
...
@@ -1664,11 +1665,18 @@ static HRESULT WINAPI GSTOutPin_DecideBufferSize(struct strmbase_source *iface,
WAVEFORMATEX
*
format
=
(
WAVEFORMATEX
*
)
pin
->
pin
.
pin
.
mt
.
pbFormat
;
buffer_size
=
format
->
nAvgBytesPerSec
;
}
else
if
(
IsEqualGUID
(
&
pin
->
pin
.
pin
.
mt
.
subtype
,
&
MEDIASUBTYPE_MPEG1AudioPayload
)
||
IsEqualGUID
(
&
pin
->
pin
.
pin
.
mt
.
subtype
,
&
MEDIASUBTYPE_MP3
))
{
/* mpg123audiodec requires at least 3 buffers as it will keep
* references to the last 2 samples. */
buffer_count
=
3
;
}
/* We do need to drop any buffers that might have been sent with the old
* caps, but this will be handled in parser_init_stream(). */
props
->
cBuffers
=
max
(
props
->
cBuffers
,
1
);
props
->
cBuffers
=
max
(
props
->
cBuffers
,
buffer_count
);
props
->
cbBuffer
=
max
(
props
->
cbBuffer
,
buffer_size
);
props
->
cbAlign
=
max
(
props
->
cbAlign
,
1
);
return
IMemAllocator_SetProperties
(
allocator
,
props
,
&
ret_props
);
...
...
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