Skip to content

ReplayGain not supported when tag is in lowercase

Hello,

There is a bug in "vlc-2.0.5\include\vlc_input.h", function "vlc_audio_replay_gain_MergeFromMeta".

This function tries to read ReplayGain tags, but it only works when the tags are in upper case : REPLAYGAIN_TRACK_GAIN, REPLAYGAIN_TRACK_PEAK, REPLAYGAIN_ALBUM_GAIN, REPLAYGAIN_ALBUM_PEAK.

But these tags are often (always?) in lower case in music file tags.

Maybe just changing :

    if( (psz_value = vlc_meta_GetExtra(p_meta, "REPLAYGAIN_TRACK_GAIN")) ||
        (psz_value = vlc_meta_GetExtra(p_meta, "RG_RADIO")) )

... with :

    if( (psz_value = vlc_meta_GetExtra(p_meta, "REPLAYGAIN_TRACK_GAIN")) ||
        (psz_value = vlc_meta_GetExtra(p_meta, "replaygain_track_gain")) ||
        (psz_value = vlc_meta_GetExtra(p_meta, "RG_RADIO")) )

... will do the job (for the 4 tags).

Thanks.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information