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
43d2fd73
Commit
43d2fd73
authored
Dec 20, 2017
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lib/xiph/VorbisComments: return std::unique_ptr<Tag>
parent
71f1ec0b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
5 deletions
+6
-5
VorbisDecoderPlugin.cxx
src/decoder/plugins/VorbisDecoderPlugin.cxx
+1
-2
VorbisComments.cxx
src/lib/xiph/VorbisComments.cxx
+2
-2
VorbisComments.hxx
src/lib/xiph/VorbisComments.hxx
+3
-1
No files found.
src/decoder/plugins/VorbisDecoderPlugin.cxx
View file @
43d2fd73
...
...
@@ -152,12 +152,11 @@ static void
vorbis_send_comments
(
DecoderClient
&
client
,
InputStream
&
is
,
char
**
comments
)
{
Tag
*
tag
=
vorbis_comments_to_tag
(
comments
);
auto
tag
=
vorbis_comments_to_tag
(
comments
);
if
(
!
tag
)
return
;
client
.
SubmitTag
(
is
,
std
::
move
(
*
tag
));
delete
tag
;
}
void
...
...
src/lib/xiph/VorbisComments.cxx
View file @
43d2fd73
...
...
@@ -100,12 +100,12 @@ vorbis_comments_scan(char **comments,
}
Tag
*
std
::
unique_ptr
<
Tag
>
vorbis_comments_to_tag
(
char
**
comments
)
noexcept
{
TagBuilder
tag_builder
;
vorbis_comments_scan
(
comments
,
add_tag_handler
,
&
tag_builder
);
return
tag_builder
.
empty
()
?
nullptr
:
tag_builder
.
CommitNew
()
.
release
()
;
:
tag_builder
.
CommitNew
();
}
src/lib/xiph/VorbisComments.hxx
View file @
43d2fd73
...
...
@@ -22,6 +22,8 @@
#include "check.h"
#include <memory>
struct
ReplayGainInfo
;
struct
TagHandler
;
struct
Tag
;
...
...
@@ -33,7 +35,7 @@ void
vorbis_comments_scan
(
char
**
comments
,
const
TagHandler
&
handler
,
void
*
handler_ctx
);
Tag
*
std
::
unique_ptr
<
Tag
>
vorbis_comments_to_tag
(
char
**
comments
)
noexcept
;
#endif
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