diff options
author | Warren Dukes <warren.dukes@gmail.com> | 2004-08-13 03:54:31 +0000 |
---|---|---|
committer | Warren Dukes <warren.dukes@gmail.com> | 2004-08-13 03:54:31 +0000 |
commit | 63efaae0eecc391b157fed544af1b72af50e5a63 (patch) | |
tree | 3894c90f7b8c14d54e99b97c7b4dcc5f3b74253b /src/inputPlugins/flac_plugin.c | |
parent | ce2fe32c54573afc2a64af5b06d3f42ec08f16ce (diff) | |
download | mpd-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.c | 8 |
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, |