Michael Niedermayer
0eecf40935
avcodec/mjpegdec: Fix context fields becoming inconsistent
...
Fixes out of array access
Fixes: asan_heap-oob_1ca4f85_2760_cov_144449187_miss_congeniality_pegasus_ljpg.avi
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Martin Storsjö
f20141d73f
vorbis_parser: Include stdint.h in the header, to make it work standalone
...
This fixes "make checkheaders".
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years ago
Michael Niedermayer
57ed5a64fe
hnm4: change width/height to int to fix hypothetical integer overflows
...
CC: libav-stable@libav.org
Bug-Id: CID 1135770 / CID 1135771
10 years ago
Luca Barbato
16158da960
hnm4: Use av_image_check_size
...
As done for all the other codecs not calling it indirectly.
CC: libav-stable@libav.org
Bug-Id: CID 1135770 / CID 1135771
10 years ago
Michael Niedermayer
51946d2de8
vc1: Use the correct shift amount
...
`is_intra` is a 6bits bitfield.
CC: libav-stable@libav.org
Bug-Id: CID 1194380 / CID 1194381
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
10 years ago
Luca Barbato
d25afb579f
vc1: Set the is_intra bitfield to all 1 when needed
...
Keep the code as similar as possible across the codepaths to
ease spotting it for factorization.
Based on a patch from Michael Niedermayer <michaelni@gmx.at>.
10 years ago
Luca Barbato
b67138598c
vc1: Simplify a little setting the intra variables
...
The code currently set the information in at least 4 places, spare
some pointless loops.
Make the code in the loop a little uniform to make easier factorize
it out later.
10 years ago
Michael Niedermayer
62e52b94e6
vorbis_parser: Move vp check to avoid a null pointer dereference
...
CC: libav-stable@libav.org
Bug-Id: CID 1251347
10 years ago
Michael Niedermayer
c117da9d3e
lpc: remove unneeded {}
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Vittorio Giovara
bc75b64cff
vc1pred: remove logically dead code
...
CC: libav-stable@libav.org
Bug-Id: CID 1245699 / CID 1245700
10 years ago
Carl Eugen Hoyos
20f3cdf0c8
Include config.h from huffyuvdsp.h.
...
Fixes a warning about undefined HAVE_BIGENDIAN when running make checkheaders.
10 years ago
Carl Eugen Hoyos
0e3ea5b28a
Include stddef from snow_dwt.h.
...
Fixes make checkheaders.
10 years ago
Michael Niedermayer
172d22a071
avcodec/mjpegdec: Add YUVA420 formats to *scale asserts
...
Fixes assertion failure
Fixes: signal_sigabrt_7ffff6ac7bb9_2042_cov_2593130068_ef1f8a057bb6056674fad92f6b8c0acd.jpg
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
03a17f2bbf
avcodec/mjpegdec: Print the number of bits in the unsupported pixel format error
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
0bf416f262
avcodec/mjpegdec: Check for pixfmtid 0x42111100 || 0x24111100 with more than 8 bits
...
These cases are not supported yet
Fixes assertion failure
Fixes: signal_sigabrt_7ffff6ac7bb9_1_cov_1553101927_00.jpg
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Lukasz Marek
c9d39fc8c6
lavc/huffyuvdec: fix mem leak in case of init failure
...
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
10 years ago
Lukasz Marek
02cb7d4c9c
lavc/smvjpegdec: fix mem leak in case of init failure
...
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
10 years ago
Lukasz Marek
efe34e87eb
lavc/libxvid: fix mem leak in case of init failure
...
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
10 years ago
Vittorio Giovara
208f3abb91
aacsbr: always initialize max_qmf_subbands
...
Fixes a wordly warning from clang -Wsometimes-uninitialized.
10 years ago
Michael Niedermayer
55b59fab88
roqaudio: Always use the frame buffer on flush
...
Prevent NULL dereference.
CC: libav-stable@libav.org
Bug-Id: CID 703669
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
10 years ago
Vittorio Giovara
0562887a98
tiffenc: initialize return value
...
'ret' can only be used without initialization if s->height <= 0, which can
only happen if avctx->height <= 0, which is validated elsewhere. Doesn't hurt
to still initialize it though.
CC: libav-stable@libav.org
Bug-Id: CID 732296
10 years ago
Luca Barbato
299d8ab104
cook: Make sure there is enough extradata
...
At least 8 bytes are needed (Mono audio).
Bug-Id: CID 741418
CC: libav-stable@libav.org
10 years ago
Vittorio Giovara
b99ca86350
aacdec: avoid an out-of-bounds write
...
Also move the check in the case it is actually used.
CC: libav-stable@libav.org
Bug-Id: CID 1087090
10 years ago
Vittorio Giovara
277ff7f5dc
lavu: move internal define to the only places where it is used
10 years ago
Vittorio Giovara
9c12c6ff95
motion_est: convert stride to ptrdiff_t
...
CC: libav-stable@libav.org
Bug-Id: CID 700556 / CID 700557 / CID 700558
10 years ago
Lukasz Marek
4e9745fbff
lavc/rv30: fix mem leak in case of init failure
...
Also replaced return -1 with return AVERROR(EINVAL)
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
10 years ago
Lukasz Marek
331fae80a1
lavc/mss1: fix mem leak in case of init failure
...
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
10 years ago
Carl Eugen Hoyos
600e38f563
Fix standalone compilation of the apng decoder on x86.
10 years ago
Clément Bœsch
6e411d9cc7
avcodec/microdvddec: support non persistent italic marker '/'
...
Inspired from a patch by Michal Wazgird <mplayer@cyryl.net>
See https://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/2014-November/072772.html
10 years ago
Clément Bœsch
8ef46f4a0c
avcodec/microdvddec: support various broken form of color tags
...
Inspired by a patch from Michal Wazgird <mplayer@cyryl.net>
See https://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/2014-November/072772.html
10 years ago
Reimar Döffinger
cad3148ea3
xface: reduce stack usage by directly storing 2 bytes data instead of pointers.
...
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
10 years ago
Reimar Döffinger
dfc6f56c5a
xface: reduce table sizes.
...
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
10 years ago
Reimar Döffinger
6369a7b742
xface: Fix encoder crashes due to too small on-stack array.
...
Also add a FATE test.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
10 years ago
Reimar Döffinger
d0682b5eb0
svq1enc: reduce stack usage of recursively-called function.
...
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
10 years ago
Reimar Döffinger
458aadf862
lpc: Reduce stack usage by allocating LLSModel in context.
...
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
10 years ago
Lukasz Marek
f87a34486a
lavc/libvorbisdec: use better error codes
...
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
10 years ago
Lukasz Marek
bceabbdaba
lavc/libvorbisdec: fix mem leak in case of init failure
...
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
10 years ago
Lukasz Marek
969382162f
lavc/smacker: fix mem leak in case of init failure
...
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
10 years ago
Lukasz Marek
691f9be622
lavc/anm: fix mem leak in case of init failure
...
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
10 years ago
Michael Niedermayer
65ce8f8895
avcodec/x86/Makefile: fix order
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Matthew Oliver
293fee4bc2
libavcodec/tiff: Fix static linking of lzma with msvc.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
d3512a0e89
avcodec/x86/lossless_audiodsp: fix fallback code for 32bit
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
ce6141259b
avcodec/wmalosslessdec: support 24bit lossless
...
Not checked if its actually lossless
Fixes Ticket1847
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
4327088da3
avcodec/x86/lossless_audiodsp: support len %16 == 8 in scalarproduct_and_madd_int16()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
2f6550bb9a
avcodec/mjpegdec: fix pixfmtid 0x14111100
...
Fixes part of Ticket 2004
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Reimar Döffinger
8437cc7206
ffv1dec: Avoid unnecessarily large stack usage and copies.
...
Ideally the compiler could figure this out on its own,
but it seems it can't.
An alternative that would avoid the messy explicit memcpy
would be to use a sub-struct for the parts that should
be preserved, which can then simply be assigned.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
10 years ago
Michael Niedermayer
0b9a9e0e2c
avcodec/libspeexdec: make array const
...
Found-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Reimar Döffinger
33fc1ccb49
h264_mb: Use smaller data type for refs in await_references.
...
As far as I can tell the value can never go outside
the int16_t type.
And especially the cost of the initialization is
reduced quite a bit by making it smaller.
Overall decoding speedup not measurable though.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
10 years ago
Reimar Döffinger
478c61ccb2
h264_i386: Optimize decode_significance_8x8_x86 for 64 bit.
...
11674 -> 10877 decicycles on my Phenom II.
Overall speedup was unfortunately within measurement error.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
10 years ago
Reimar Döffinger
c2c27e9e51
indeo2: move variable declarations into blocks using them.
...
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
10 years ago