diff options
Diffstat (limited to 'src/decoder/flac_metadata.c')
-rw-r--r-- | src/decoder/flac_metadata.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/src/decoder/flac_metadata.c b/src/decoder/flac_metadata.c index 2bfb1a6f8..2ee1d8234 100644 --- a/src/decoder/flac_metadata.c +++ b/src/decoder/flac_metadata.c @@ -64,14 +64,19 @@ flac_parse_replay_gain(const FLAC__StreamMetadata *block) rgi = replay_gain_info_new(); - found = flac_find_float_comment(block, "replaygain_album_gain", - &rgi->tuples[REPLAY_GAIN_ALBUM].gain) || - flac_find_float_comment(block, "replaygain_album_peak", - &rgi->tuples[REPLAY_GAIN_ALBUM].peak) || - flac_find_float_comment(block, "replaygain_track_gain", - &rgi->tuples[REPLAY_GAIN_TRACK].gain) || - flac_find_float_comment(block, "replaygain_track_peak", - &rgi->tuples[REPLAY_GAIN_TRACK].peak); + if (flac_find_float_comment(block, "replaygain_album_gain", + &rgi->tuples[REPLAY_GAIN_ALBUM].gain)) + found = true; + if (flac_find_float_comment(block, "replaygain_album_peak", + &rgi->tuples[REPLAY_GAIN_ALBUM].peak)) + found = true; + if (flac_find_float_comment(block, "replaygain_track_gain", + &rgi->tuples[REPLAY_GAIN_TRACK].gain)) + found = true; + if (flac_find_float_comment(block, "replaygain_track_peak", + &rgi->tuples[REPLAY_GAIN_TRACK].peak)) + found = true; + if (!found) { replay_gain_info_free(rgi); rgi = NULL; |