mpv-player/mpv — pull request #667 by ghedo (2014-03-25 14:39:51+00:00)
Title: WIP: ReplayGain side data

As per #664, I added a new replaygain_data struct and field to demuxer_t initialized from a AVReplayGain, propagated that to the filters and updated af_volume to use it. Also, I noticed that commit b72ba3f basically broke replaygain, so I reverted it for now, although I didn't try to fix it.

This depends on a yet-to-be-reviewed [libav patch](http://lists.libav.org/pipermail/libav-devel/2014-March/058215.html), since the current peak parsing in libav is more or less useless. Also, I don't (yet) check whether the replaygain stuff is actually supported (via waf and stuff)... I'm not sure if it would make sense to have both af_volume implementations (for older libav/ffmpeg).

It's also worth noting that libav currently only supports replaygain for mp3s (+ flac with [this patch](http://lists.libav.org/pipermail/libav-devel/2014-March/058216.html), and will possibly support ogg vorbis as well, once I figure out how to implement it), while the previous mpv implementation didn't really care about the file type.

I'd still like to try to make af_lavfi work as well (e.g. by copying side data to mp_audio and from there copying it to AVFrames), but it's not really high priority (and doesn't exclude the current solution either).