mirror of https://github.com/mpv-player/mpv
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:
parent
f052165dbf
commit
9b15c99aa1
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue