aboutsummaryrefslogtreecommitdiffstats
path: root/src/inputPlugins
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2006-08-22 06:36:56 +0000
committerEric Wong <normalperson@yhbt.net>2006-08-22 06:36:56 +0000
commit67de7ea1162f55b2a6d59d536827a66574bbebcd (patch)
treead320bef623d3e15748f6fb50990f669fbec7b00 /src/inputPlugins
parent504d3425f2270aa07e81a2f8114fe3a6268e960c (diff)
downloadmpd-67de7ea1162f55b2a6d59d536827a66574bbebcd.tar.gz
mpd-67de7ea1162f55b2a6d59d536827a66574bbebcd.tar.xz
mpd-67de7ea1162f55b2a6d59d536827a66574bbebcd.zip
fix Replay Gain reading for FLAC and OggFLAC
This bug was NOT introduced in my OggFLAC additions, honest! As far as I can see, it was introduced way back in r2482, but nobody ever noticed until the post here: http://www.musicpd.org/forum/index.php?topic=1152.0 While we're at it, clean up some of the variable typing. git-svn-id: https://svn.musicpd.org/mpd/trunk@4664 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src/inputPlugins')
-rw-r--r--src/inputPlugins/_flac_common.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/inputPlugins/_flac_common.c b/src/inputPlugins/_flac_common.c
index acf582709..e2b336a35 100644
--- a/src/inputPlugins/_flac_common.c
+++ b/src/inputPlugins/_flac_common.c
@@ -53,7 +53,7 @@ void init_FlacData(FlacData * data, OutputBuffer * cb,
}
static int flacFindVorbisCommentFloat(const FLAC__StreamMetadata * block,
- char *cmnt, float *fl)
+ const char *cmnt, float *fl)
{
int offset =
FLAC__metadata_object_vorbiscomment_find_entry_from(block, 0, cmnt);
@@ -82,20 +82,20 @@ static int flacFindVorbisCommentFloat(const FLAC__StreamMetadata * block,
static void flacParseReplayGain(const FLAC__StreamMetadata * block,
FlacData * data)
{
- unsigned int found = 0;
+ int found = 0;
if (data->replayGainInfo)
freeReplayGainInfo(data->replayGainInfo);
data->replayGainInfo = newReplayGainInfo();
- found &= flacFindVorbisCommentFloat(block, "replaygain_album_gain",
+ found |= flacFindVorbisCommentFloat(block, "replaygain_album_gain",
&data->replayGainInfo->albumGain);
- found &= flacFindVorbisCommentFloat(block, "replaygain_album_peak",
+ found |= flacFindVorbisCommentFloat(block, "replaygain_album_peak",
&data->replayGainInfo->albumPeak);
- found &= flacFindVorbisCommentFloat(block, "replaygain_track_gain",
+ found |= flacFindVorbisCommentFloat(block, "replaygain_track_gain",
&data->replayGainInfo->trackGain);
- found &= flacFindVorbisCommentFloat(block, "replaygain_track_peak",
+ found |= flacFindVorbisCommentFloat(block, "replaygain_track_peak",
&data->replayGainInfo->trackPeak);
if (!found) {