Andreas Rheinhardt
7eb9cf593e
avcodec/pafvideo: Cleanup generically on init failure
...
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
4 years ago
Andreas Rheinhardt
54135a0bd2
avcodec/pafvideo: Mark decoder as init-threadsafe
...
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
4 years ago
Michael Niedermayer
859362a6f0
avcodec/pafvideo: Only clear frame when it was written to
...
This avoids unneeded operations and makes the code faster.
Fixes: Timeout
Fixes: 15724/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PAF_VIDEO_fuzzer-5750842205929472 (12sec -> 9sec)
Fixes: 17625/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PAF_VIDEO_fuzzer-5640515311108096 (16sec -> 4sec)
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
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
89836ad5a7
avcodec/pafvideo: Clear frame buffer later
...
This way the clearing can be skipped in case of some errors.
Fixes: Timeout (11sec -> 344ms)
Fixes: 14670/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PAF_VIDEO_fuzzer-5769534503387136
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
8d77debf7d
avcodec/pafvideo: Check input space for decode_0() before slow operations
...
Fixes: Timeout (11sec -> 2sec)
Fixes: 14403/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PAF_VIDEO_fuzzer-5697465698746368
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
66acb63028
avcodec/pafvideo: Check allocated frame size
...
Fixes: OOM
Fixes: 5549/clusterfuzz-testcase-minimized-5390553567985664
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
9c85329cd0
avcodec/pafvideo: Check for bitstream end in decode_0()
...
Fixes: Timeout
Fixes: 3529/clusterfuzz-testcase-5057068371279872
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
c4360559ee
avcodec/pafvideo: Fix assertion failure
...
Fixes: 2100/clusterfuzz-testcase-minimized-4522961547558912
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
faa5a2181d
avcodec/pafvideo: Check packet size and frame code before ff_reget_buffer()
...
Fixes 1745/clusterfuzz-testcase-minimized-6160693365571584
Fixes: Timeout
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
Vittorio Giovara
def97856de
lavc: AV-prefix all codec capabilities
...
Express bitfields more simply.
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
9 years ago
Paul B Mahol
02dc75f218
avcodec/pafvideo: remove unused header
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
10 years ago
Nidhi Makhijani
b0633f83f2
paf: split audio and video decoder
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
11 years ago
Paul B Mahol
70daeacd6e
PAF demuxer and decoder
...
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
11 years ago
Clément Bœsch
b46f19100b
cosmetics: group remaining .name and .long_name.
...
See b2bed9325
.
11 years ago
Paul B Mahol
1c11ab82d6
paf_video: make code independent of sizeof(AVFrame)
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Paul B Mahol
a9b424879f
lavc & lavf: replace deprecated av_log* functions
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Paul B Mahol
2cced2a854
paf: decode directly to the user-provided AVFrame
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Paul B Mahol
da726a8763
paf, sanm: remove unused header after b05830169d
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Paul B Mahol
4012cd6c4f
lavc: fix decode_frame() third parameter semantics for rest of video decoders
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Michael Niedermayer
8c6d651fc3
paf: avoid using expressions with sideeffects in AV_R*
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
f952ae1400
pafdec: fix wrong check for input buffer size.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
456f0c6477
pafdec: fix wrong palette index check.
...
Fixes Ticket1641
Found-by: Piotr Bandurski <ami_stuff@o2.pl>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Paul B Mahol
bd70a52712
paf: prevent invalid write
...
Closes #1631 .
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Paul B Mahol
296bcdd2a7
paf: use reget_bufer() instead of get_buffer()
...
Pallete is written to frame->data[1] only if it changes.
This fixes PAL8->PAL8 transcoding.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Paul B Mahol
c2cbe58cd4
paf: add forgotten CODEC_CAP_DR1
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
13 years ago
Paul B Mahol
7de4a16508
PAF demuxer and decoder
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
13 years ago