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
1092882f
You need to sign in or sign up before continuing.
Commit
1092882f
authored
Nov 10, 2020
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
decoder/dsdiff: apply padding to odd-sized chunks
Closes
https://github.com/MusicPlayerDaemon/MPD/issues/1001
parent
8a7986c3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
1 deletion
+14
-1
NEWS
NEWS
+2
-0
DsdiffDecoderPlugin.cxx
src/decoder/plugins/DsdiffDecoderPlugin.cxx
+12
-1
No files found.
NEWS
View file @
1092882f
ver 0.22.4 (not yet released)
* decoder
- dsdiff: apply padding to odd-sized chunks
ver 0.22.3 (2020/11/06)
* playlist
...
...
src/decoder/plugins/DsdiffDecoderPlugin.cxx
View file @
1092882f
...
...
@@ -55,6 +55,17 @@ struct DsdiffChunkHeader {
uint64_t
GetSize
()
const
{
return
size
.
Read
();
}
/**
* Applies padding to GetSize(), according to the DSDIFF
* specification
* (http://www.sonicstudio.com/pdf/dsd/DSDIFF_1.5_Spec.pdf)
* section 2.3.
*/
[[
nodiscard
]]
constexpr
uint64_t
GetPaddedSize
()
const
noexcept
{
return
(
GetSize
()
+
1
)
&
~
uint64_t
(
1
);
}
};
/** struct for DSDIFF native Artist and Title tags */
...
...
@@ -117,7 +128,7 @@ dsdiff_read_prop_snd(DecoderClient *client, InputStream &is,
return
false
;
offset_type
chunk_end_offset
=
is
.
GetOffset
()
+
header
.
GetSize
();
+
header
.
Get
Padded
Size
();
if
(
chunk_end_offset
>
end_offset
)
return
false
;
...
...
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