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
c883d761
Commit
c883d761
authored
Nov 11, 2008
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wavpack: make the "key" argument to wavpack_tag() const
This allows us to remove the "static char[]" hack.
parent
e2c07dbb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
9 deletions
+5
-9
wavpack_plugin.c
src/decoder/wavpack_plugin.c
+5
-9
No files found.
src/decoder/wavpack_plugin.c
View file @
c883d761
...
@@ -214,7 +214,7 @@ wavpack_decode(struct decoder * decoder, WavpackContext *wpc, bool canseek,
...
@@ -214,7 +214,7 @@ wavpack_decode(struct decoder * decoder, WavpackContext *wpc, bool canseek,
}
}
static
char
*
static
char
*
wavpack_tag
(
WavpackContext
*
wpc
,
char
*
key
)
wavpack_tag
(
WavpackContext
*
wpc
,
c
onst
c
har
*
key
)
{
{
char
*
value
=
NULL
;
char
*
value
=
NULL
;
int
size
;
int
size
;
...
@@ -232,38 +232,34 @@ wavpack_tag(WavpackContext *wpc, char *key)
...
@@ -232,38 +232,34 @@ wavpack_tag(WavpackContext *wpc, char *key)
static
struct
replay_gain_info
*
static
struct
replay_gain_info
*
wavpack_replaygain
(
WavpackContext
*
wpc
)
wavpack_replaygain
(
WavpackContext
*
wpc
)
{
{
static
char
replaygain_track_gain
[]
=
"replaygain_track_gain"
;
static
char
replaygain_album_gain
[]
=
"replaygain_album_gain"
;
static
char
replaygain_track_peak
[]
=
"replaygain_track_peak"
;
static
char
replaygain_album_peak
[]
=
"replaygain_album_peak"
;
struct
replay_gain_info
*
replay_gain_info
;
struct
replay_gain_info
*
replay_gain_info
;
bool
found
=
false
;
bool
found
=
false
;
char
*
value
;
char
*
value
;
replay_gain_info
=
replay_gain_info_new
();
replay_gain_info
=
replay_gain_info_new
();
value
=
wavpack_tag
(
wpc
,
replaygain_track_gain
);
value
=
wavpack_tag
(
wpc
,
"replaygain_track_gain"
);
if
(
value
)
{
if
(
value
)
{
replay_gain_info
->
track_gain
=
atof
(
value
);
replay_gain_info
->
track_gain
=
atof
(
value
);
free
(
value
);
free
(
value
);
found
=
true
;
found
=
true
;
}
}
value
=
wavpack_tag
(
wpc
,
replaygain_album_gain
);
value
=
wavpack_tag
(
wpc
,
"replaygain_album_gain"
);
if
(
value
)
{
if
(
value
)
{
replay_gain_info
->
album_gain
=
atof
(
value
);
replay_gain_info
->
album_gain
=
atof
(
value
);
free
(
value
);
free
(
value
);
found
=
true
;
found
=
true
;
}
}
value
=
wavpack_tag
(
wpc
,
replaygain_track_peak
);
value
=
wavpack_tag
(
wpc
,
"replaygain_track_peak"
);
if
(
value
)
{
if
(
value
)
{
replay_gain_info
->
track_peak
=
atof
(
value
);
replay_gain_info
->
track_peak
=
atof
(
value
);
free
(
value
);
free
(
value
);
found
=
true
;
found
=
true
;
}
}
value
=
wavpack_tag
(
wpc
,
replaygain_album_peak
);
value
=
wavpack_tag
(
wpc
,
"replaygain_album_peak"
);
if
(
value
)
{
if
(
value
)
{
replay_gain_info
->
album_peak
=
atof
(
value
);
replay_gain_info
->
album_peak
=
atof
(
value
);
free
(
value
);
free
(
value
);
...
...
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