Hi All,
This bug is marked as fixed but the fix isn't in GIT trunk. Has it been
forgotten? Can the patch be applied to GIT please? Below is a more up to
date patch:

Cheers,
Tim.

========

diff --git a/src/decoder/flac_metadata.c b/src/decoder/flac_metadata.c
index 2bfb1a6..e258fa6 100644
--- a/src/decoder/flac_metadata.c
+++ b/src/decoder/flac_metadata.c
@@ -19,7 +19,7 @@

 #include "config.h"
 #include "flac_metadata.h"
-#include "replay_gain_info.h"
+#include "replay_gain_config.h"
 #include "tag.h"

 #include <glib.h>
@@ -64,14 +64,18 @@ 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 (REPLAY_GAIN_ALBUM == replay_gain_mode) {
+         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);
+       } else if (REPLAY_GAIN_TRACK == replay_gain_mode) {
+         found = 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 (!found) {
                replay_gain_info_free(rgi);
                rgi = NULL;


------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
Musicpd-dev-team mailing list
Musicpd-dev-team@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team

Reply via email to