aboutsummaryrefslogtreecommitdiffstats
path: root/src/inputPlugins/flac_plugin.c
diff options
context:
space:
mode:
authorWarren Dukes <warren.dukes@gmail.com>2004-08-13 03:54:31 +0000
committerWarren Dukes <warren.dukes@gmail.com>2004-08-13 03:54:31 +0000
commit63efaae0eecc391b157fed544af1b72af50e5a63 (patch)
tree3894c90f7b8c14d54e99b97c7b4dcc5f3b74253b /src/inputPlugins/flac_plugin.c
parentce2fe32c54573afc2a64af5b06d3f42ec08f16ce (diff)
downloadmpd-63efaae0eecc391b157fed544af1b72af50e5a63.tar.gz
mpd-63efaae0eecc391b157fed544af1b72af50e5a63.tar.xz
mpd-63efaae0eecc391b157fed544af1b72af50e5a63.zip
don't call replaygain and cause preamp to beused if no replaygain tag exists
git-svn-id: https://svn.musicpd.org/mpd/trunk@2026 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r--src/inputPlugins/flac_plugin.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/inputPlugins/flac_plugin.c b/src/inputPlugins/flac_plugin.c
index eec99f233..5d1a4e02f 100644
--- a/src/inputPlugins/flac_plugin.c
+++ b/src/inputPlugins/flac_plugin.c
@@ -352,16 +352,16 @@ void flacParseReplayGain(const FLAC__StreamMetadata *block, FlacData * data) {
}
if(!found || state == REPLAYGAIN_TRACK) {
- if(flacFindVorbisCommentFloat(block,"replaygain_track_gain",
- &gain))
- {
+ found = flacFindVorbisCommentFloat(block,
+ "replaygain_track_gain", &gain);
+ if(found) {
peak = 0.0;
flacFindVorbisCommentFloat(block,
"replaygain_track_peak",&peak);
}
}
- data->replayGainScale = computeReplayGainScale(gain,peak);
+ if(found) data->replayGainScale = computeReplayGainScale(gain,peak);
}
void flacMetadata(const FLAC__SeekableStreamDecoder *dec,