This has been fixed differently and its revert avoids error messages
when decoding xx.flv. This also reduces the difference to qatar.
This reverts commit 5a2b3f3a52.
Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Pass the correct size in bits to mpeg4audio_get_config and add a flag
to disable parsing of the sync extension when the size is not known.
Latm with AudioMuxVersion 0 does not specify the size of the audio
specific config. Data after the audio specific config can be
misinterpreted as sync extension resulting in random and wrong configs.
Locking the decoder against channel config changes in
parse_adts_frame_header() seems to be unnecessary and
streams with channel config changes are reported.
The sample in http://roundup.libav.org/issue999 still works.
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
This fixes changing channels
It possibly might cause regressions but i cant avoid this without having a test
case that needs the locking code.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Long term it would be nice to support error resilient reconfiguration
but right now setting this every frame does more harm than help.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Resetting it on codec init would incorrectly clear the values
if av_find_stream_info was already run before, in particular
breaking ffplay.
This fixes trac tickets #213 and #262.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Fixes memory leaks which are the result of overwriting already-initialized
MDCT contexts during context reinitialization, e.g. in valgrind
fate-aac-latm_000000001180bc60.
Signed-off-by: Diego Biurrun <diego@biurrun.de>
All decode_channel_map calls together can easily read
more data than the amount of padding available.
Thus below patch adds an input length check before reading them.
Fixes some invalid reads with sample from
http://bugzilla.mplayerhq.hu/show_bug.cgi?id=1138
Instead, scalefactors are adjusted by the offset amount, removing the need
for sf_scale, and the MDCT scales are adjusted to compensate for the higher
scalefactors. Floating-point output will be handled by modifying the MDCT
scales.
erroring out. A magnitude of 100 corresponds to 2^25 so the will most
likely result in clipped output anyway.
None of the conformance streams fall in the range that need to be clipped.