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
e1c16d78
Commit
e1c16d78
authored
Oct 13, 2021
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
decoder/wavpack: use AllocatedString for concatenation
parent
a49b49cb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
14 deletions
+6
-14
WavpackDecoderPlugin.cxx
src/decoder/plugins/WavpackDecoderPlugin.cxx
+6
-14
No files found.
src/decoder/plugins/WavpackDecoderPlugin.cxx
View file @
e1c16d78
...
...
@@ -24,7 +24,7 @@
#include "pcm/CheckAudioFormat.hxx"
#include "tag/Handler.hxx"
#include "fs/Path.hxx"
#include "util/Alloc.hxx"
#include "util/Alloc
atedString
.hxx"
#include "util/Math.hxx"
#include "util/ScopeExit.hxx"
#include "util/RuntimeError.hxx"
...
...
@@ -37,6 +37,8 @@
#include <iterator>
#include <memory>
using
std
::
string_view_literals
::
operator
""
sv
;
#define ERRORLEN 80
#ifdef OPEN_DSD_AS_PCM
...
...
@@ -506,22 +508,12 @@ static WavpackStreamReader mpd_is_reader = {
#endif
static
InputStreamPtr
wavpack_open_wvc
(
DecoderClient
&
client
,
const
char
*
uri
)
wavpack_open_wvc
(
DecoderClient
&
client
,
std
::
string_view
uri
)
{
/*
* As we use dc->utf8url, this function will be bad for
* single files. utf8url is not absolute file path :/
*/
if
(
uri
==
nullptr
)
return
nullptr
;
char
*
wvc_url
=
xstrcatdup
(
uri
,
"c"
);
AtScopeExit
(
wvc_url
)
{
free
(
wvc_url
);
};
const
AllocatedString
wvc_url
{
uri
,
"c"
sv
};
try
{
return
client
.
OpenUri
(
wvc_url
);
return
client
.
OpenUri
(
wvc_url
.
c_str
()
);
}
catch
(...)
{
return
nullptr
;
}
...
...
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