Andreas Rheinhardt
b3df59a5ea
avcodec/hnm4video: Mark decoder as init-threadsafe
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-05-02 02:57:55 +02:00
Andreas Rheinhardt
a247ac640d
avcodec: Constify AVCodecs
...
Given that the AVCodec.next pointer has now been removed, most of the
AVCodecs are not modified at all any more and can therefore be made
const (as this patch does); the only exceptions are the very few codecs
for external libraries that have a init_static_data callback.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2021-04-27 10:43:15 -03:00
Andreas Rheinhardt
dff4012ab7
avcodec/hnm4video: Don't reimplement FFSWAP()
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-09-19 18:47:01 +02:00
Andreas Rheinhardt
cc83f36b9d
avcodec/hnm4video: Don't return nonsense error messages
...
The HNM 4 video decoder's init function claimed that an allocation
failed if the image dimensions are wrong. This is fixed in this commit:
The dimensions are checked before the allocations are attempted.
The check whether width * height is zero is redundant as
av_image_check_size() already checks for this; it has been removed.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-09-19 18:46:56 +02:00
Andreas Rheinhardt
042af30303
avcodec/hnm4video: Cleanup generically on init failure
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-09-19 18:46:53 +02:00
Michael Niedermayer
cd460f4da0
avcodec/hnm4video: Optimize postprocess_current_frame()
...
Improves: Timeout (220sec -> 108sec)
Improves: 15570/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HNM4_VIDEO_fuzzer-5085482213441536
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-08-12 08:45:07 +02:00
Michael Niedermayer
9af8ce754b
avcodec/hnm4video: Forward errors of decode_interframe_v4()
...
Fixes: Timeout (108sec -> 160ms)
Fixes: 15570/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HNM4_VIDEO_fuzzer-5085482213441536
Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se>
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-08-03 20:32:20 +02:00
Marton Balint
4c501bafc0
avcodec/hnm4video: fix palette alpha
...
Signed-off-by: Marton Balint <cus@passwd.hu>
2018-04-30 21:50:12 +02:00
Michael Niedermayer
444e9874a7
Merge commit 'def97856de6021965db86c25a732d78689bd6bb0'
...
* commit 'def97856de6021965db86c25a732d78689bd6bb0':
lavc: AV-prefix all codec capabilities
Conflicts:
cmdutils.c
ffmpeg.c
ffplay.c
libavcodec/8svx.c
libavcodec/aacenc.c
libavcodec/ac3dec.c
libavcodec/adpcm.c
libavcodec/alac.c
libavcodec/atrac3plusdec.c
libavcodec/bink.c
libavcodec/dnxhddec.c
libavcodec/dvdec.c
libavcodec/dvenc.c
libavcodec/ffv1dec.c
libavcodec/ffv1enc.c
libavcodec/fic.c
libavcodec/flacdec.c
libavcodec/flacenc.c
libavcodec/flvdec.c
libavcodec/fraps.c
libavcodec/frwu.c
libavcodec/gifdec.c
libavcodec/h261dec.c
libavcodec/hevc.c
libavcodec/iff.c
libavcodec/imc.c
libavcodec/libopenjpegdec.c
libavcodec/libvo-aacenc.c
libavcodec/libvorbisenc.c
libavcodec/libvpxdec.c
libavcodec/libvpxenc.c
libavcodec/libx264.c
libavcodec/mjpegbdec.c
libavcodec/mjpegdec.c
libavcodec/mpegaudiodec_float.c
libavcodec/msmpeg4dec.c
libavcodec/mxpegdec.c
libavcodec/nvenc_h264.c
libavcodec/nvenc_hevc.c
libavcodec/pngdec.c
libavcodec/qpeg.c
libavcodec/ra288.c
libavcodec/rv10.c
libavcodec/s302m.c
libavcodec/sp5xdec.c
libavcodec/takdec.c
libavcodec/tiff.c
libavcodec/tta.c
libavcodec/utils.c
libavcodec/v210dec.c
libavcodec/vp6.c
libavcodec/vp9.c
libavcodec/wavpack.c
libavcodec/yop.c
Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-27 22:50:18 +02:00
Vittorio Giovara
def97856de
lavc: AV-prefix all codec capabilities
...
Express bitfields more simply.
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-07-27 15:24:58 +01:00
Michael Niedermayer
ba1a19bc35
Merge commit '16158da9607f2f84232d3dd381406b2f2449ec74'
...
* commit '16158da9607f2f84232d3dd381406b2f2449ec74':
hnm4: Use av_image_check_size
See: e23b18321f
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-25 12:19:08 +01:00
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
2014-11-25 02:00:06 +00:00
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
2014-11-25 02:00:06 +00:00
Michael Niedermayer
4d7d9a5782
avcodec/hnm4video: check offset before subtraction in decode_interframe_v4a()
...
Fixes out of array read
Fixes: signal_sigsegv_1326a09_1752_cov_245452111_GRTH301.HNS
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-03 03:11:48 +01:00
Michael Niedermayer
e23b18321f
avcodec/hnm4video: change width/height to int
...
Fixes hypothetical integer overflows
Related to CID1135770 & CID1135771
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-10 23:50:08 +01:00
Michael Niedermayer
321b338762
avcodec/hnm4video: allocate frame only when theres a coded frame
...
Fixes memleak
Fixes: asan_heap-oob_e76bdf_2224_MOTHOO.HNM
This patch also removes the setting of palette_has_changed,
which was set on a frame that was never returned
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-11-23 21:05:29 +01:00
Michael Niedermayer
ffe31c654d
avcodec/hnm4video: check writeoffset in decode_interframe_v4a()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-11-22 23:52:08 +01:00
Michael Niedermayer
bd8d28e2d2
avcodec/hnm4video: check dimensions for validity
...
Fixes out of array read
Fixes: asan_heap-oob_e76e18_1244_CASSE.HNM
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-11-22 23:52:08 +01:00
Michael Niedermayer
b33f3246e2
avcodec/hnm4video: fix missing newlines in error messages
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-11-22 22:31:47 +01:00
Michael Niedermayer
78446f0d9d
avcodec/hnm4video: fix write offset checks in decode_interframe_v4()
...
Fixes: asan_heap-oob_e76a51_1244_CASSE.HNM
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-11-22 22:31:46 +01:00
Michael Niedermayer
5a08ba5381
avcodec/hnm4video: check offset in decode_interframe_v4() more completely
...
Fixes out of array reads
Fixes: signal_sigsegv_e74c1e_1092_BROCIME.HNM
Fixes: signal_sigsegv_e74e85_2620_PLAQUE0.HNM
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-11-22 22:12:27 +01:00
Michael Niedermayer
0398b7cbd3
avcodec/hnm4video: check intraframe size
...
Fixes hypothetical integer overflow with HNM4_CHUNK_ID_IZ
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-11-22 17:02:00 +01:00
Michael Niedermayer
ba992711f7
avcodec/hnm4video: check that packetsize is at least 8
...
Fixes integer overflow and assertion failure
Fixes: signal_sigabrt_7ffff7126425_1243_CASSE.HNM
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-11-22 17:02:00 +01:00
Paul B Mahol
315e3cf047
avcodec/hnm4video: remove redundant log message
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-11-07 14:04:21 +00:00
Michael Niedermayer
a2bfee36b7
Merge commit '9af7a8523a6bb517834ebed36093bdab11a8b38e'
...
* commit '9af7a8523a6bb517834ebed36093bdab11a8b38e':
HNM4/HNM4A demuxer & video decoder
Conflicts:
Changelog
doc/general.texi
libavcodec/Makefile
libavcodec/allcodecs.c
libavcodec/avcodec.h
libavcodec/version.h
libavformat/Makefile
libavformat/allformats.c
libavformat/version.h
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-11-01 10:46:39 +01:00
David Kment
9af7a8523a
HNM4/HNM4A demuxer & video decoder
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-10-31 17:45:46 +01:00