aboutsummaryrefslogtreecommitdiffstats
path: root/src/inputPlugins/flac_plugin.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/inputPlugins/flac_plugin.c')
-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,