467677769a
avcodec/mpeg4videodec: Clear sprite wraping on unsupported cases in VOP decode
...
Fixes: Integer overflow
Fixes: 1572/clusterfuzz-testcase-minimized-4578773729017856
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-05-14 16:47:58 +02:00
c1c3a14073
libavcodec/mpeg4videodec: Convert sprite_offset to 64bit
...
This avoids intermediates from overflowing (the final values are checked)
Fixes: runtime error: signed integer overflow: -167712 + -2147352576 cannot be represented in type 'int'
Fixes: 1298/clusterfuzz-testcase-minimized-5955580877340672
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-05-04 19:49:45 +02:00
6ac0e78183
mpeg4videodec: raise an error if sprite_trajectory.table is NULL
...
CC: libav-stable@libav.org
Bug-Id: 1012
2017-04-05 17:23:39 -04:00
e2a4f1a9eb
avcodec/mpeg4videodec: Fix runtime error: signed integer overflow: -135088512 * 16 cannot be represented in type 'int'
...
Fixes: 736/clusterfuzz-testcase-5580263943831552
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-03-09 23:28:10 +01:00
fab13bbbcd
avcodec/mpeg4videodec: Fix runtime error: signed integer overflow: 134527392 * 16 cannot be represented in type 'int'
...
This checks the sprite delta intermediates for overflow
Fixes: 716/clusterfuzz-testcase-4890287480504320
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-03-05 12:01:41 +01:00
eb41956636
avcodec/mpeg4videodec: Improve the overflow checks in mpeg4_decode_sprite_trajectory()
...
Also clear the state on errors
Fixes integer overflows in 701/clusterfuzz-testcase-6594719951880192
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-03-04 03:05:15 +01:00
25e93aacc2
avcodec/mpeg4videodec: Fix runtime error: left shift of negative value -2650
...
Fixes: 674/clusterfuzz-testcase-6713275880308736
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-02-28 01:13:52 +01:00
76ba09d182
avcodec/mpeg4videodec: Check the other 3 sprite points for intermediate overflows
...
This is not necessarily specific to fuzzed files
Fixes: Multiple integer overflows
Fixes: 656/clusterfuzz-testcase-6463814516080640
Fixes: 658/clusterfuzz-testcase-6691260146384896
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-02-24 00:38:45 +01:00
6871df02d9
avcodec/mpeg4videodec: Check sprite_offset in addition to shifts
...
Fixes: 651/clusterfuzz-testcase-5710668915277824
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-02-22 22:29:03 +01:00
6179dc8aa7
avcodec/mpeg4video: Fix runtime error: left shift of negative value
...
Fixes: 644/clusterfuzz-testcase-4726434209726464
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-02-22 02:42:48 +01:00
aa2b75263e
avcodec/mpeg4videodec: Fix runtime error: shift exponent -2 is negative
...
Fixes: 612/clusterfuzz-testcase-4707817137111040
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-02-19 21:49:03 +01:00
fd9212f2ed
Mark some arrays that never change as const.
2017-02-01 10:42:59 +01:00
cde007dcd3
avcodec: Add FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM to most h263 based codecs
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2017-01-21 02:30:38 +01:00
8258e36385
avcodec/mpeg4videodec: Fix undefined shifts in mpeg4_decode_sprite_trajectory()
...
Fixes: part of 670190.ogg
Found-by: Matt Wolenetz <wolenetz@google.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2016-12-09 17:44:54 +01:00
2c9106257f
avcodec/mpeg4videodec: Workaround interlaced mpeg4 edge MC bug
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2016-11-17 12:21:48 +01:00
6c98398b0b
lavc/get_bits: add a logging context to check_marker()
...
Based on d338abb664
2016-06-22 20:07:49 +02:00
8ef57a0d61
Merge commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb'
...
* commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb':
cosmetics: Fix spelling mistakes
Merged-by: Clément Bœsch <u@pkh.me >
2016-06-21 21:55:34 +02:00
f730367a60
avcodec/mpeg4videodec: Fix default low_delay flag value if not coded
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2016-06-05 20:55:09 +02:00
87c53e5354
avcodec/mpeg4videodec: Print low_delay value with -debug 1 in decode_vol_header()
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2016-06-05 20:19:57 +02:00
d338abb664
mpeg4videodec: Call av_log() in check_marker() with AVCodecContext instead of NULL
...
Signed-off-by: Anton Khirnov <anton@khirnov.net >
2016-05-16 10:51:17 +02:00
e4b38878da
Move check_marker() from get_bits to mpeg4videodec
...
MPEG-4 is the only decoder which uses check_marker().
Signed-off-by: Anton Khirnov <anton@khirnov.net >
2016-05-16 10:51:01 +02:00
41ed7ab45f
cosmetics: Fix spelling mistakes
...
Signed-off-by: Diego Biurrun <diego@biurrun.de >
2016-05-04 18:16:21 +02:00
564dd3f0f4
mpeg4videodec: silence ubsan warning
...
s->ac_val[0][0] is of type 'int16_t [16]', but points into a larger buffer.
Here it is used as base pointer to find the correct position in the
larger buffer by adding 's->block_index[n] * 16' and thus as 'int16_t *'.
This fixes clang's ubsan runtime error: index out of bounds for type
'int16_t [16]'
Fixes: test_case.mp4
Found-by: Tyson Smith <twsmith@mozilla.com >
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc >
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com >
2016-01-15 23:48:33 +01:00
5e8b053452
Merge commit '2c6811397bdf13d43ca206e48d6d6da9c2cd47c6'
...
* commit '2c6811397bdf13d43ca206e48d6d6da9c2cd47c6':
lavc: add profiles to AVCodecDescriptor
Merged-by: Hendrik Leppkes <h.leppkes@gmail.com >
2016-01-01 16:20:39 +01:00
70f13abb4f
avcodec/mpeg4videodec: also for empty partitioned slices
...
Fixes assertion failure
Fixes: id_acf3e47f864e1ee4c7b86c0653e0ff31e5bde56e.m4v
Found-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2015-12-19 23:54:10 +01:00
2c6811397b
lavc: add profiles to AVCodecDescriptor
...
The profiles are a property of the codec, so it makes sense to export
them through AVCodecDescriptors, not just the codec implementations.
2015-12-12 21:22:49 +01:00
fb99ef0bd3
avcodec: use AV_OPT_TYPE_BOOL in a bunch of places
2015-12-04 15:37:05 +01:00
891dc8f875
avcodec/mpeg4videodec: Check available data before reading custom matrix
...
Fixes: out of array read
Fixes: 76c515fc3779d1b838667c61ea13ce92/asan_heap-oob_1fc0d07_8913_794a4629a264ebdb25b58d3a94ed1785.bit
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2015-11-29 23:45:31 +01:00
2cbaa078d1
avcodec: use HAVE_THREADS header guards to silence -Wunused-function
...
When compiled with --disable-pthreads, e.g
http://fate.ffmpeg.org/report.cgi?time=20150917015044&slot=alpha-debian-qemu-gcc-4.7 ,
a bunch of -Wunused-functions are reported due to missing header guards
around threading related functions.
This patch should silence such warnings.
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com >
2015-10-04 12:47:34 -04:00
a383f226f0
lavc: move vdpau decoders under FF_API_VDPAU.
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com >
2015-08-18 15:57:20 -04:00
9468207e1c
mpeg4video: use ff_dlog instead of av_log under debug&FF_DEBUG_PTS.
...
This fixes compilation with FF_API_UNUSED_MEMBERS=0.
2015-08-18 15:39:41 -04:00
6471040f56
FF_OPT_TYPE_* -> AV_OPT_TYPE_*.
2015-08-18 11:48:49 -04:00
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
94d68a41fa
Merge commit '7c6eb0a1b7bf1aac7f033a7ec6d8cacc3b5c2615'
...
* commit '7c6eb0a1b7bf1aac7f033a7ec6d8cacc3b5c2615':
lavc: AV-prefix all codec flags
Conflicts:
doc/examples/muxing.c
ffmpeg.c
ffmpeg_opt.c
ffplay.c
libavcodec/aacdec.c
libavcodec/aacenc.c
libavcodec/ac3dec.c
libavcodec/ac3enc_float.c
libavcodec/atrac1.c
libavcodec/atrac3.c
libavcodec/atrac3plusdec.c
libavcodec/dcadec.c
libavcodec/ffv1enc.c
libavcodec/h264.c
libavcodec/h264_loopfilter.c
libavcodec/h264_mb.c
libavcodec/imc.c
libavcodec/libmp3lame.c
libavcodec/libtheoraenc.c
libavcodec/libtwolame.c
libavcodec/libvpxenc.c
libavcodec/libxavs.c
libavcodec/libxvid.c
libavcodec/mpeg12dec.c
libavcodec/mpeg12enc.c
libavcodec/mpegaudiodec_template.c
libavcodec/mpegvideo.c
libavcodec/mpegvideo_enc.c
libavcodec/mpegvideo_motion.c
libavcodec/nellymoserdec.c
libavcodec/nellymoserenc.c
libavcodec/nvenc.c
libavcodec/on2avc.c
libavcodec/options_table.h
libavcodec/opus_celt.c
libavcodec/pngenc.c
libavcodec/ra288.c
libavcodec/ratecontrol.c
libavcodec/twinvq.c
libavcodec/vc1_block.c
libavcodec/vc1_loopfilter.c
libavcodec/vc1_mc.c
libavcodec/vc1dec.c
libavcodec/vorbisdec.c
libavcodec/vp3.c
libavcodec/wma.c
libavcodec/wmaprodec.c
libavcodec/x86/hpeldsp_init.c
libavcodec/x86/me_cmp_init.c
Merged-by: Michael Niedermayer <michael@niedermayer.cc >
2015-07-27 22:10:35 +02:00
059a934806
lavc: Consistently prefix input buffer defines
...
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com >
2015-07-27 15:24:59 +01:00
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
7c6eb0a1b7
lavc: AV-prefix all codec flags
...
Convert doxygen to multiline and express bitfields more simply.
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com >
2015-07-27 15:24:58 +01:00
269a71b68a
avcodec/mpeg4videodec: Clarify the mpeg4_unpack_bframes reference.
...
This should avoid misunderstandings like in Ticket4618
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2015-07-15 21:05:24 +02:00
c06e556274
avcodec/mpeg4videodec: Check P cbpy
...
Fixes undefined behavior
Fixes: signal_sigsegv_c3097a_991_xtrem_e2_m64q15_a32sxx.3gp
Found-by: Samuel Groß, Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2015-07-11 00:22:29 +02:00
261b715593
avcodec/mpeg4videodec: Mark static table as const
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at >
2015-06-11 00:48:41 +02:00
fd116b8dfa
Merge commit '378a00087fdadcc9b34165c05cd10a1a15f3fe61'
...
* commit '378a00087fdadcc9b34165c05cd10a1a15f3fe61':
mpegvideo: Move tables to a separate file
Merged-by: Michael Niedermayer <michaelni@gmx.at >
2015-06-01 01:26:36 +02:00
378a00087f
mpegvideo: Move tables to a separate file
2015-05-31 13:06:19 +02:00
d860084c50
avcodec/mpegvideo: Reset bitstream_buffer_size on allocation failure
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at >
2015-05-29 00:33:18 +02:00
75647622b5
Merge commit '6f57375d707de40dcec28d3cef886c364e032c21'
...
* commit '6f57375d707de40dcec28d3cef886c364e032c21':
rl: Rename ff_*_rl() to ff_rl_*()
Conflicts:
libavcodec/mpeg4videodec.c
libavcodec/rl.c
libavcodec/rl.h
Merged-by: Michael Niedermayer <michaelni@gmx.at >
2015-05-28 21:48:49 +02:00
6f57375d70
rl: Rename ff_*_rl() to ff_rl_*()
2015-05-28 15:38:43 +01:00
d5227ceff1
Merge commit '9c1db92ad372d4cd69e0490e691c56e4097cb193'
...
* commit '9c1db92ad372d4cd69e0490e691c56e4097cb193':
mpegvideo: Drop err_recognition
Conflicts:
libavcodec/h263dec.c
libavcodec/ituh263dec.c
libavcodec/mpeg4video.h
libavcodec/mpeg4videodec.c
libavcodec/msmpeg4dec.c
Merged-by: Michael Niedermayer <michaelni@gmx.at >
2015-05-22 20:38:42 +02:00
d9b264bc73
Merge commit '848e86f74d3e6e87fa592ee8ba8c184cc5fd9a42'
...
* commit '848e86f74d3e6e87fa592ee8ba8c184cc5fd9a42':
mpegvideo: Drop flags and flags2
Conflicts:
libavcodec/mpeg12dec.c
libavcodec/mpeg12enc.c
libavcodec/mpegvideo.c
libavcodec/mpegvideo_enc.c
libavcodec/mpegvideo_motion.c
libavcodec/ratecontrol.c
libavcodec/vc1_block.c
libavcodec/vc1_loopfilter.c
libavcodec/vc1_mc.c
libavcodec/vc1dec.c
Merged-by: Michael Niedermayer <michaelni@gmx.at >
2015-05-22 20:24:41 +02:00
9c1db92ad3
mpegvideo: Drop err_recognition
...
It is just a duplicate of an AVCodecContext member so use it instead.
2015-05-22 15:34:39 +01:00
848e86f74d
mpegvideo: Drop flags and flags2
...
They are just duplicates of AVCodecContext members so use those instead.
2015-05-22 15:34:39 +01:00
b3408ae4c6
mpeg4videodec: only allow a positive length
...
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com >
Signed-off-by: Michael Niedermayer <michaelni@gmx.at >
2015-04-22 16:57:52 +02:00