Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
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
Иван Мажукин
mpd
Commits
43da4c0e
Commit
43da4c0e
authored
Dec 23, 2014
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
input/mms: limit the mmsx_read() size
parent
b9c77718
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
0 deletions
+9
-0
NEWS
NEWS
+2
-0
MmsInputPlugin.cxx
src/input/plugins/MmsInputPlugin.cxx
+7
-0
No files found.
NEWS
View file @
43da4c0e
ver 0.19.8 (not yet released)
* input
- mms: reduce delay at the beginning of playback
* decoder
- dsdiff, dsf: allow ID3 tags larger than 4 kB
...
...
src/input/plugins/MmsInputPlugin.cxx
View file @
43da4c0e
...
...
@@ -92,6 +92,13 @@ input_mms_open(const char *url,
size_t
MmsInputStream
::
ThreadRead
(
void
*
ptr
,
size_t
read_size
,
Error
&
error
)
{
/* unfortunately, mmsx_read() blocks until the whole buffer
has been filled; to avoid big latencies, limit the size of
each chunk we read to a reasonable size */
constexpr
size_t
MAX_CHUNK
=
16384
;
if
(
read_size
>
MAX_CHUNK
)
read_size
=
MAX_CHUNK
;
int
nbytes
=
mmsx_read
(
nullptr
,
mms
,
(
char
*
)
ptr
,
read_size
);
if
(
nbytes
<=
0
)
{
if
(
nbytes
<
0
)
...
...
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