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
54c591bd
Commit
54c591bd
authored
Oct 28, 2014
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
decoder/mad: fix negative replay gain values
Negating an unsigned integer does not work.
parent
217d88f2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
1 deletion
+2
-1
NEWS
NEWS
+1
-0
MadDecoderPlugin.cxx
src/decoder/plugins/MadDecoderPlugin.cxx
+1
-1
No files found.
NEWS
View file @
54c591bd
...
@@ -5,6 +5,7 @@ ver 0.19.2 (not yet released)
...
@@ -5,6 +5,7 @@ ver 0.19.2 (not yet released)
* decoder
* decoder
- faad: remove workaround for ancient libfaad2 ABI bug
- faad: remove workaround for ancient libfaad2 ABI bug
- ffmpeg: recognize MIME type audio/aacp
- ffmpeg: recognize MIME type audio/aacp
- mad: fix negative replay gain values
* output
* output
- fix memory leak after filter initialization error
- fix memory leak after filter initialization error
- fall back to PCM if given DSD sample rate is not supported
- fall back to PCM if given DSD sample rate is not supported
...
...
src/decoder/plugins/MadDecoderPlugin.cxx
View file @
54c591bd
...
@@ -657,7 +657,7 @@ parse_lame(struct lame *lame, struct mad_bitptr *ptr, int *bitlen)
...
@@ -657,7 +657,7 @@ parse_lame(struct lame *lame, struct mad_bitptr *ptr, int *bitlen)
unsigned
name
=
mad_bit_read
(
ptr
,
3
);
/* gain name */
unsigned
name
=
mad_bit_read
(
ptr
,
3
);
/* gain name */
unsigned
orig
=
mad_bit_read
(
ptr
,
3
);
/* gain originator */
unsigned
orig
=
mad_bit_read
(
ptr
,
3
);
/* gain originator */
unsigned
sign
=
mad_bit_read
(
ptr
,
1
);
/* sign bit */
unsigned
sign
=
mad_bit_read
(
ptr
,
1
);
/* sign bit */
unsigned
gain
=
mad_bit_read
(
ptr
,
9
);
/* gain*10 */
int
gain
=
mad_bit_read
(
ptr
,
9
);
/* gain*10 */
if
(
gain
&&
name
==
1
&&
orig
!=
0
)
{
if
(
gain
&&
name
==
1
&&
orig
!=
0
)
{
lame
->
track_gain
=
((
sign
?
-
gain
:
gain
)
/
10.0
)
+
adj
;
lame
->
track_gain
=
((
sign
?
-
gain
:
gain
)
/
10.0
)
+
adj
;
FormatDebug
(
mad_domain
,
"LAME track gain found: %f"
,
FormatDebug
(
mad_domain
,
"LAME track gain found: %f"
,
...
...
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