James Almer
9ea6d2149e
avcodec/decode: add a flags parameter to ff_reget_buffer()
...
Some decoders may not need a writable buffer in some specific cases, but only
a reference to the existing buffer with updated frame properties instead, for
the purpose of returning duplicate frames. For this, the
FF_REGET_BUFFER_FLAG_READONLY flag is added, which will prevent potential
allocations and buffer copies when they are not needed.
Signed-off-by: James Almer <jamrial@gmail.com>
5 years ago
Michael Niedermayer
5dc94924d0
avcodec/clearvideo: fix invalid shift in tile size check
...
Fixes: left shift of 1 by 31 places cannot be represented in type 'int'
Fixes: 15631/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CLEARVIDEO_fuzzer-5690110605000704
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years ago
Michael Niedermayer
41f93f9411
avcodec/clearvideo: Check remaining data in P frames
...
Fixes: Timeout (19sec -> 419msec)
Fixes: 13411/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CLEARVIDEO_fuzzer-5733153811988480
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years ago
Michael Niedermayer
7aaab127be
avcodec/clearvideo: Check remaining input bits in P macro block loop
...
Fixes: Timeout
Fixes: 11083/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CLEARVIDEO_fuzzer-5657180351496192
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years ago
Paul B Mahol
f09fdf2d9c
avcodec/clearvideo: display warning if decoder overreads input
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
7 years ago
Paul B Mahol
e34751cb8a
avcodec/clearvideo: do not try to return frame when it is same as previous one
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
7 years ago
Carl Eugen Hoyos
916632dfbb
lavc/clearvideo: Allow decoding without extradata.
7 years ago
James Almer
fefe47b701
avcodec/clearvideo: fix mixed code and declarations
...
Signed-off-by: James Almer <jamrial@gmail.com>
7 years ago
Paul B Mahol
a874586994
avcodec/clearvideo: add inter-frame decoding
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
7 years ago
Michael Niedermayer
f0efd795f4
avcodec/clearvideo: Only output a frame if one is coded in the packet
...
Fixes: Timeout (183 ms instead of about 20 sec)
Fixes: 3147/clusterfuzz-testcase-4870592182353920
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years ago
Michael Niedermayer
43c394dcae
avcodec/clearvideo: Check buf_size before decoding frame
...
Fixes; Timeout
Fixes: 1826/clusterfuzz-testcase-minimized-5728569256837120
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
Michael Niedermayer
28230a690e
avcodec/clearvideo: Fix runtime error: signed integer overflow: 181 * 18050756 cannot be represented in type 'int'
...
Fixes: 1417/clusterfuzz-testcase-minimized-6606778030620672
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
Michael Niedermayer
c0ffcb34c7
avcodec/clearvideo: Fix multiple runtime error: left shift of negative value -1024
...
Fixes: 1360/clusterfuzz-testcase-minimized-5606472043986944
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
Luca Barbato
73fc82f343
vlc: Add header #include when the types are used
...
Do not rely on indirectly including it from bitstream.h.
Signed-off-by: Diego Biurrun <diego@biurrun.de>
8 years ago
Diego Biurrun
d0ce0634e0
clearvideo: Convert to the new bitstream reader
8 years ago
Kostya Shishkov
189157c3fc
Add ClearVideo decoder
...
Only I-frames are decoded for now.
Signed-off-by: Diego Biurrun <diego@biurrun.de>
8 years ago
Michael Niedermayer
fe46d92c15
avcodec/clearvideo: Do not lose the return code of decode_mb()
...
Fixes CID1401671
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
James Almer
f5c8d004c2
avcodec: stop using deprecated codec flags
...
Signed-off-by: James Almer <jamrial@gmail.com>
8 years ago
Kostya Shishkov
a63496cc88
avcodec: add ClearVideo decoder
...
Only I-frames are decoded for now.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
8 years ago