mirror of
https://github.com/mpv-player/mpv.git
synced 2026-10-29 15:11:09 +08:00
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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user