diff options
author | Warren Dukes <warren.dukes@gmail.com> | 2004-11-02 02:44:11 +0000 |
---|---|---|
committer | Warren Dukes <warren.dukes@gmail.com> | 2004-11-02 02:44:11 +0000 |
commit | aab6515c52aebd5532ba6d5326196395928d39ba (patch) | |
tree | e1a6f6a49d3d43404906e792ca9fabf81557db3f /src/inputPlugins | |
parent | 9ef68105cb3fde47c15224054e1c6755c333018f (diff) | |
download | mpd-aab6515c52aebd5532ba6d5326196395928d39ba.tar.gz mpd-aab6515c52aebd5532ba6d5326196395928d39ba.tar.xz mpd-aab6515c52aebd5532ba6d5326196395928d39ba.zip |
patches for 0.11.5 bug fix from the following revision changes:
1993
2000
2001
2026
2028
2038
2078
2116
2163
2164
2230
2236
2270
2337
2339
2420
2426
git-svn-id: https://svn.musicpd.org/mpd/branches/branch-0.11.4-fixes@2461 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r-- | src/inputPlugins/flac_plugin.c | 12 | ||||
-rw-r--r-- | src/inputPlugins/ogg_plugin.c | 8 |
2 files changed, 12 insertions, 8 deletions
diff --git a/src/inputPlugins/flac_plugin.c b/src/inputPlugins/flac_plugin.c index eec99f233..1adf5a349 100644 --- a/src/inputPlugins/flac_plugin.c +++ b/src/inputPlugins/flac_plugin.c @@ -277,7 +277,7 @@ void flacError(const FLAC__SeekableStreamDecoder *dec, ERROR("crc mismatch %s\n", data->path); break; default: - ERROR("unknow flac error %s\n", data->path); + ERROR("unknown flac error %s\n", data->path); } } @@ -298,7 +298,7 @@ void flacPrintErroredState(FLAC__SeekableStreamDecoderState state, ERROR("flac seekable stream error: %s\n",file); break; case FLAC__SEEKABLE_STREAM_DECODER_ALREADY_INITIALIZED: - ERROR("flac decoder already initilaized: %s\n",file); + ERROR("flac decoder already initialized: %s\n",file); break; case FLAC__SEEKABLE_STREAM_DECODER_INVALID_CALLBACK: ERROR("invalid flac callback\n"); @@ -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, diff --git a/src/inputPlugins/ogg_plugin.c b/src/inputPlugins/ogg_plugin.c index c65de71aa..5d461586e 100644 --- a/src/inputPlugins/ogg_plugin.c +++ b/src/inputPlugins/ogg_plugin.c @@ -157,12 +157,16 @@ float ogg_getReplayGainScale(char ** comments) { if(albumGainFound) { return computeReplayGainScale(albumGain,albumPeak); } - return computeReplayGainScale(trackGain,trackPeak); + else if(trackGainFound) { + return computeReplayGainScale(trackGain,trackPeak); + } case REPLAYGAIN_TRACK: if(trackGainFound) { return computeReplayGainScale(trackGain,trackPeak); } - return computeReplayGainScale(albumGain,albumPeak); + else if(albumGainFound) { + return computeReplayGainScale(albumGain,albumPeak); + } } return 1.0; |