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
ad83c7f7
Commit
ad83c7f7
authored
Apr 23, 2012
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tag_rva2: move code to rva2_apply_frame()
parent
6b52d040
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
16 deletions
+13
-16
tag_rva2.c
src/tag_rva2.c
+13
-16
No files found.
src/tag_rva2.c
View file @
ad83c7f7
...
...
@@ -86,24 +86,14 @@ rva2_apply_data(struct replay_gain_info *replay_gain_info,
return
true
;
}
bool
tag_rva2_parse
(
struct
id3_tag
*
tag
,
struct
replay_gain_info
*
replay_gain_info
)
static
bool
rva2_apply_frame
(
struct
replay_gain_info
*
replay_gain_info
,
const
struct
id3_frame
*
frame
)
{
struct
id3_frame
const
*
frame
;
id3_latin1_t
const
*
id
;
id3_byte_t
const
*
data
;
const
id3_latin1_t
*
id
=
id3_field_getlatin1
(
id3_frame_field
(
frame
,
0
));
id3_length_t
length
;
/* relative volume adjustment information */
frame
=
id3_tag_findframe
(
tag
,
"RVA2"
,
0
);
if
(
frame
==
NULL
)
return
false
;
id
=
id3_field_getlatin1
(
id3_frame_field
(
frame
,
0
));
data
=
id3_field_getbinarydata
(
id3_frame_field
(
frame
,
1
),
&
length
);
const
id3_byte_t
*
data
=
id3_field_getbinarydata
(
id3_frame_field
(
frame
,
1
),
&
length
);
if
(
id
==
NULL
||
data
==
NULL
)
return
false
;
...
...
@@ -134,3 +124,10 @@ tag_rva2_parse(struct id3_tag *tag, struct replay_gain_info *replay_gain_info)
return
false
;
}
bool
tag_rva2_parse
(
struct
id3_tag
*
tag
,
struct
replay_gain_info
*
replay_gain_info
)
{
struct
id3_frame
const
*
frame
=
id3_tag_findframe
(
tag
,
"RVA2"
,
0
);
return
frame
!=
NULL
&&
rva2_apply_frame
(
replay_gain_info
,
frame
);
}
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