replaygain: fix gain sign decoding

The gain sign was incorrectly decoded: since the FFSIGN() macro treats 0 as
negative, gain values starting with "0." were always decoded as negative.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
replaygain: correctly parse peak values

According to the ReplayGain spec, the peak amplitude may overflow and may result
in peak amplitude values greater than 1.0 with psychoacoustically coded audio,
such as MP3. Fully compliant decoders must allow peak overflows.

Additionally, having peak values in the 0<->UINT32_MAX scale makes it more
difficult for applications to actually use the peak values (e.g. when
implementing clipping prevention) since values have to be rescaled down.

This patch corrects the peak parsing by removing the rescaling of the decoded
values between 0 and UINT32_MAX and the 1.0 upper limit.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
flacdec: export replaygain tags from Vorbis comments

Signed-off-by: Anton Khirnov <anton@khirnov.net>
lavu/opt: validate range before dereference

This change make error handling simplier.
av_opt_freep_ranges may be called when some ranges are NULL,
for example after memory allocation fail.

Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
x86/synth_filter: remove the main loop when it's not needed

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit '25b6837f7cacd691b19cbc12b9dad1ce84a318a1'

* commit '25b6837f7cacd691b19cbc12b9dad1ce84a318a1':
  replaygain: fix gain sign decoding

Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit '8542f9c4f17125d483c40c0c5723842f1c982f81'

* commit '8542f9c4f17125d483c40c0c5723842f1c982f81':
  replaygain: correctly parse peak values

Conflicts:
	libavutil/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit '1d55f8d5f6f2cd74fa27170e2be37a72441d9202'

* commit '1d55f8d5f6f2cd74fa27170e2be37a72441d9202':
  flacdec: export replaygain tags from Vorbis comments

Merged-by: Michael Niedermayer <michaelni@gmx.at>
Support raw dvdsub palette as stored on normal dvd's

This is how the palette is stored on dvd's. Currently
only xbmc passes the palette information to libavcodec
this way.
Check return value of avio_seek and avoid modifying state if it fails

The code still modifies state if the timestamp is not found. Not
sure exactly how to avoid that.
asf hacks
if av_read_packet returns AVERROR_IO, we are done. ffmpeg's codecs might or might not handle returning any completed demuxed packets correctly
added: Ticket #7187, TV Teletext support for DVB EBU Teletext streams
Don't accept mpegts PMT that isn't current
Don't reparse PMT unless it's version has changed
Read PID timestamps as well as PCR timestamps to find location in mpegts stream
Get stream durations using read_timestamp
changed: allow 4 second skew between streams in mov before attempting to seek
fixed: memleak in mpegts demuxer on some malformed (??) mpegts files with too large pes packets

at-visions sample file brokenStream.mpg
Speed up mpegts av_find_stream_info