demux: handle Matroska-style replaygain tags as well

Matroska doesn't follow the usual ReplayGain conventions, and doesn't
distinguish between track/album values.

Fixes #2128.
This commit is contained in:
wm4 2015-07-12 19:33:34 +02:00
parent f052165dbf
commit 9b15c99aa1
1 changed files with 8 additions and 0 deletions

View File

@ -813,6 +813,14 @@ static void demux_export_replaygain(demuxer_t *demuxer)
{
apply_replaygain(demuxer, &rg);
}
if (!decode_gain(demuxer, "REPLAYGAIN_GAIN", &rg.track_gain) &&
!decode_peak(demuxer, "REPLAYGAIN_PEAK", &rg.track_peak))
{
rg.album_gain = rg.track_gain;
rg.album_peak = rg.track_peak;
apply_replaygain(demuxer, &rg);
}
}
// Copy all fields from src to dst, depending on event flags.