Hendrik Leppkes
3aca10bf76
latm: Always reconfigure if no extradata was set previously
...
AAC LOAS can have new audio config objects in the stream itself.
Make sure the decoder reconfigures itself when the first one arrives
midstream.
Bug-Id: 644
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
11 years ago
John Stebbins
462d5e8e6c
aacdec: set AVFrame sample_rate
...
AVFrame.sample_rate is set in ff_get_buffer, but aacdec calls
ff_get_buffer before the samplerate is known. So it needs to be
set again before returning the frame.
11 years ago
Michael Niedermayer
6e42ccb9db
avcodec/aacdec: Fix pulse position checks in decode_pulses()
...
Fixes out of array read
Fixes: asan_static-oob_1efed25_1887_cov_2013541199_HeyYa_RA10_AAC_192K_30s.rm
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
676a395ab9
avcodec/aacdec: Dont fail if channels arent known yet
...
Fixes Ticket3312
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Alex Converse
7f29644108
aac: Fix low delay windowing.
...
AAC LD uses a low overlap sine window instead of a KBD window.
11 years ago
Alex Converse
b2212dec0f
aac: Fix TNS decoding for the 512 sample window family.
11 years ago
Anssi Hannula
e10fccf62a
avcodec/aacdec: default to non-wide 7.1 in non-strict mode
...
AAC specification has 7.1(wide) as a default layout for 8-channel
streams (channel config 7). However, at least Nero AAC encoder encodes
non-wide 7.1 streams using the default channel config 7, mapping the
side channels of the original audio stream to the second
AAC_CHANNEL_FRONT pair in the AAC stream. Similarly, e.g. FAAD decodes
the second AAC_CHANNEL_FRONT pair as side channels, therefore decoding
the incorrect streams as if they were correct (and as the encoder
intended).
FFmpeg currently decodes such files by-the-spec, i.e. after decoding the
original front pair will be in AV_CH_FRONT_x_OF_CENTER and the original
side pair will be in AV_CH_FRONT_x.
As actual intended 7.1(wide) streams are very rare while misencoded 7.1
files actually exist in the wild, default to assuming a 7.1 layout was
intended unless in strict mode.
Fixes playback of e.g. 8_Channel_ID.m4a in samples.
Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Diego Biurrun
8f8bc92365
Add missing #includes for *INT64_MAX and *INT64_C
11 years ago
Gian-Carlo Pascutto
454959a5aa
aacdec: Set the profile during decoding
...
Previously the profile would not be set if the bitstream needs
to be decoded to know the profile.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
11 years ago
Compn
6173b0fea7
aacdec: fix small comment, update decoder features comment
11 years ago
Alex Converse
adea4512c6
aacdec: Fix calls to avpriv_report_missing_feature().
...
It does not take log level as an argument.
11 years ago
Michael Niedermayer
435a730e21
avcodec/aacdec: fix more avpriv_report_missing_feature() arguments
...
Found-by: durandal_1707
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
72cf47b241
avcodec/aacdec: fix avpriv_report_missing_feature() arguments
...
Found-by: durandal_1707
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Alex Converse
b3be41ca82
aac: Add support for Enhanced AAC Low Delay (ER AAC ELD).
...
This does not include support for LD SBR, epTool, data resilience, nor
the 960 transform family.
11 years ago
Alex Converse
f457edb697
aacdec: Use avpriv_report_missing_feature() instead of custom logging.
11 years ago
Diego Biurrun
b2bed9325d
cosmetics: Group .name and .long_name together in codec/format declarations
11 years ago
Alex Converse
1914e6f010
aacdec: Add support for LD (Low Delay) AAC
11 years ago
Alex Converse
5cdefc0207
aacdec: Add support for Error Resilience syntax.
...
This does not add support for any error resilience tools.
11 years ago
Luca Barbato
a10c4ce24b
aac: Forward errors properly in aac_decode_frame_int
...
Incidentally also remove a warning.
12 years ago
Luca Barbato
71953ebcf9
aac: Check init_get_bits return value
...
Some code paths can call it with invalid length.
CC: libav-stable@libav.org
12 years ago
Diego Biurrun
4a2ef39442
cosmetics: Add '0' to float constants ending in '.'.
12 years ago
Luca Barbato
07c52e2c7c
aac: return meaningful errors
12 years ago
Luca Barbato
6d8629aac1
aac: K&R formatting cosmetics
12 years ago
Hendrik Leppkes
d18341fb11
aacdec: free frame buffer if no audio was decoded
...
If no decoding error was detected, but still no audio was decoded, the
frame needs to be free'ed, or it will leak.
Fixes part of ticket #2095
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Luca Barbato
a943a132f3
aac: check the maximum number of channels
...
Broken bitstreams could report a larger than specified number of
channels and cause outbound writes.
CC:libav-stable@libav.org
12 years ago
Diego Biurrun
12e25ed284
avcodec: av_log_missing_feature(1) ---> avpriv_request_sample()
12 years ago
Diego Biurrun
6d97484d72
avcodec: av_log_ask_for_sample() ---> avpriv_request_sample()
12 years ago
Diego Biurrun
63d744e2be
av_log_missing_feature() ---> avpriv_report_missing_feature()
12 years ago
Clément Bœsch
1ec94b0f06
lavc: factorize ff_{thread_,re,}get_buffer error messages.
...
Coccinelle profile used:
@@
expression r, ctx, f, loglevel, str, flags;
@@
-if ((r = ff_get_buffer(ctx, f, flags)) < 0) {
- av_log(ctx, loglevel, str);
- return r;
-}
+if ((r = ff_get_buffer(ctx, f, flags)) < 0)
+ return r;
@@
expression r, ctx, f, loglevel, str;
@@
-if ((r = ff_reget_buffer(ctx, f)) < 0) {
- av_log(ctx, loglevel, str);
- return r;
-}
+if ((r = ff_reget_buffer(ctx, f)) < 0)
+ return r;
@@
expression r, ctx, f, loglevel, str, flags;
@@
-if ((r = ff_thread_get_buffer(ctx, f, flags)) < 0) {
- av_log(ctx, loglevel, str);
- return r;
-}
+if ((r = ff_thread_get_buffer(ctx, f, flags)) < 0)
+ return r;
...along with some manual patches for the remaining ones.
12 years ago
Michael Niedermayer
eab49f4fb5
Revert "aacdec: Reconfigure output as needed, disable pop_output_configuration()"
...
This reverts commit 60dbf2eff9
.
This is not needed anymore, Ticket 1694 has been fixed differently
12 years ago
Anton Khirnov
759001c534
lavc decoders: work with refcounted frames.
12 years ago
Michael Niedermayer
60dbf2eff9
aacdec: Reconfigure output as needed, disable pop_output_configuration()
...
Fixes Ticket1694
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Diego Biurrun
c242bbd8b6
Remove unnecessary dsputil.h #includes
12 years ago
Michael Niedermayer
23c9180c00
aacdec: Fix warning: initialization from incompatible pointer type
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
6f77122bf5
aac: reconfigure output on pop
...
Fixes Ticket1918
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
21f68528e3
aacdec: dont pop random configurations
...
Fixes out of array accesses
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Justin Ruggles
ffd2123095
aac: decode directly to the user-provided AVFrame
12 years ago
Mirjana Vulin
2b6a8187a6
mips: optimization for float aac decoder (core module)
...
Signed-off-by: Mirjana Vulin <mvulin@mips.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
73abc3a634
aacdec: check init_get_bits return
...
Also fixes an integer overflow
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
96f452ac64
aacdec: check channel count
...
Prevent out of array accesses
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Ronald S. Bultje
5959bfaca3
floatdsp: move butterflies_float from dsputil to avfloatdsp.
...
This makes wmadec/enc, twinvq and mpegaudiodec (i.e. mp2/mp3)
independent of dsputil.
12 years ago
Ronald S. Bultje
42d3246948
floatdsp: move vector_fmul_reverse from dsputil to avfloatdsp.
...
Now, nellymoserenc and aacenc no longer depends on dsputil. Independent
of this patch, wmaprodec also does not depend on dsputil, so I removed
it from there also.
12 years ago
Ronald S. Bultje
d56668bd80
floatdsp: move scalarproduct_float from dsputil to avfloatdsp.
...
This makes the aac decoder and all voice codecs independent of dsputil.
12 years ago
Carl Eugen Hoyos
12cb21efa6
Make the latm decoder less verbose on initialisation.
...
Reviewed-by: Paul B Mahol
12 years ago
Justin Ruggles
e034cc6c60
lavc: Move vector_fmul_window to AVFloatDSPContext
...
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
12 years ago
Carl Eugen Hoyos
b563afe6fa
Do not allow arbitrary packet size in aac decoder.
...
Fixes a crash with a file containing a 400MB packet reported in bug 420.
12 years ago
Michael Niedermayer
b113d4a83c
aacdec: make dual mono mode selectable through AVOptions too.
...
Based on patch by Akihiro Tsukada
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
644f021ccf
aacdec: simplify dmono
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
6d38661920
aacdec: fix dual mono
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Alex Converse
6d5b009267
aacdec: Fix an off-by-one overwrite when switching to LTP profile from MAIN.
...
Found-by: pawlkt
CC: libav-stable@libav.org
12 years ago