Alexandra Hájková
692ba4fe64
flashsv: Convert to the new bitstream reader
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
8 years ago
Michael Niedermayer
17705f5d4f
avcodec/flashsv: Check size before updating it
...
Fixes out of array read
Fixes: 3c857d4d90365731524716e6d051e43a/signal_sigsegv_7f4f59bcc29e_1386_20abd2c8e655cb9c75b24368e65fe3b1.flv
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Luca Barbato
50d2a3b5f3
flashsv: Initialize the block array
...
Otherwise flashsv2_prime could be fed random data.
Bug-Id: 908
CC: libav-stable@libav.org
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
9 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
Vittorio Giovara
6a85dfc830
lavc: Replace av_dlog and tprintf with internal macros
10 years ago
Michael Niedermayer
a33c7dd213
avcodec/flashsv: check decode_hybrid() for overread
...
Fixes use of uninitialized memory
Fixes: msan_uninit-mem_7f906558274e_268_14_244486_2009_04_28.flv
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Alexandra Khirnova
9b8d11a76a
avcodec: Use av_reallocp where suitable
...
Signed-off-by: Martin Storsjö <martin@martin.st>
11 years ago
Anton Khirnov
042aec41ae
flashsv: use the AVFrame API properly.
11 years ago
Paul B Mahol
82f5c4d737
avcodec/flashsv: use av_freep() for tmpblock
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
11 years ago
Paul B Mahol
c3311515d5
avcodec/flashsv: fix typo
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
11 years ago
Paul B Mahol
6e094f7026
avcodec/flashsv: stop using deprecated avcodec_set_dimensions
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
11 years ago
Paul B Mahol
22c00962c2
avcodec/flashsv: use init_get_bits8()
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
11 years ago
Luca Barbato
037fea388e
flashsv: K&R formatting cosmetics
...
Also improve some log message wording/spelling.
Signed-off-by: Diego Biurrun <diego@biurrun.de>
11 years ago
Michael Niedermayer
57070b1468
flashsv: Check diff_start diff_height values
...
Fix out of array accesses.
Found-by: ami_stuff
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Luca Barbato
4a64e67988
flashsv: Refactor a little
11 years ago
Diego Biurrun
b2bed9325d
cosmetics: Group .name and .long_name together in codec/format declarations
11 years ago
Michael Niedermayer
880c73cd76
avcodec/flashsv: check diff_start/height
...
Fixes out of array accesses
Fixes Ticket2844
Found-by: ami_stuff
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Diego Biurrun
12e25ed284
avcodec: av_log_missing_feature(1) ---> avpriv_request_sample()
12 years ago
Clément Bœsch
1ec94b0f06
lavc: factorize ff_{thread_,re,}get_buffer error messages.
...
Coccinelle profile used:
@@
expression r, ctx, f, loglevel, str, flags;
@@
-if ((r = ff_get_buffer(ctx, f, flags)) < 0) {
- av_log(ctx, loglevel, str);
- return r;
-}
+if ((r = ff_get_buffer(ctx, f, flags)) < 0)
+ return r;
@@
expression r, ctx, f, loglevel, str;
@@
-if ((r = ff_reget_buffer(ctx, f)) < 0) {
- av_log(ctx, loglevel, str);
- return r;
-}
+if ((r = ff_reget_buffer(ctx, f)) < 0)
+ return r;
@@
expression r, ctx, f, loglevel, str, flags;
@@
-if ((r = ff_thread_get_buffer(ctx, f, flags)) < 0) {
- av_log(ctx, loglevel, str);
- return r;
-}
+if ((r = ff_thread_get_buffer(ctx, f, flags)) < 0)
+ return r;
...along with some manual patches for the remaining ones.
12 years ago
Anton Khirnov
3b199d29cd
lavc decoders: properly initialize AVFrame.
12 years ago
Anton Khirnov
759001c534
lavc decoders: work with refcounted frames.
12 years ago
Michael Niedermayer
a084884b62
flashsv: clear blocks array on reallocation
...
Fixes use of uninitialized data
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
b6671787db
flashsv2_prime: check block before using it.
...
Fixes null pointer dereference
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Anton Khirnov
df9b956751
lavc: fix decode_frame() third parameter semantics for video decoders
...
It's got_frame, not data size
12 years ago
Janne Grunau
3ae69b9166
flashsv: make sure data for zlib priming is available
...
Fixes a segfault in the fuzzed sample resolutionchange.flv_s314809.
CC: libav-stable@libav.org
12 years ago
Janne Grunau
5ae72f5453
flashsv: check for keyframe before using differential coding
...
Fixes a segfault in te fuzzed sample resolutionchange.flv_s211713.
CC: libav-stable@libav.org
12 years ago
Diego Biurrun
17fecb4a59
flashsv: Drop unused function and struct parameters
12 years ago
Michael Niedermayer
ea3eaa37b1
flashsv: only realloc blocks for version 2
...
Fixes 10l regression introducing a memleak
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
bc08ca841e
flashsv: reallocate block array independant of frame type.
...
Fixes NULL pointer dereference
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
e9cb533fbb
flashv: check if keyframe is available, fix null deref.
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
4b2f696d6e
flashv: use avcodec_set_dimensions()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Diego Biurrun
8f4c414df6
Improve wording and spelling of av_log_missing_feature messages.
12 years ago
Michael Niedermayer
b3eb4f54c0
flashsv: check deflateInit() return value
...
Fixes CID703620
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Janne Grunau
c466eb1746
flashsv: propagate inflateReset() errors
...
Fixes CID717493.
12 years ago
Anton Khirnov
716d413c13
Replace PIX_FMT_* -> AV_PIX_FMT_*, PixelFormat -> AVPixelFormat
12 years ago
Anton Khirnov
36ef5369ee
Replace all CODEC_ID_* with AV_CODEC_ID_*
12 years ago
Martin Storsjö
00c3b67b8a
cosmetics: Align codec declarations
...
Also break some long lines, remove codec function placeholder comments
and add spaces in sample/pixel format lists.
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Diego Biurrun
4b7f49082f
flashsv: return more meaningful error value
13 years ago
Diego Biurrun
f9a9c8f9bc
flashsv: fix typo in av_log() message
13 years ago
Kostya Shishkov
c2d23309ef
add Flash Screen Video 2 decoder
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
14 years ago
Diego Biurrun
b8783b98c5
flashsv: split flashsv_decode_block() off from flashsv_decode_frame().
14 years ago
Diego Biurrun
51915cfa47
flashsv: inline copy_region() into flashsv_decode_frame()
14 years ago
Diego Biurrun
91fe776913
flashsv: improve some variable names
14 years ago
Diego Biurrun
dc90031038
flashsv: improve some comments and fix some wrong ones
14 years ago
Diego Biurrun
a082e68030
flashsv: Eliminate redundant variable indirection.
...
As a positive side-effect, this gets rid of the following warning:
libavcodec/flashsv.c:190:38: warning: assignment discards ‘const’ qualifier from pointer target type
14 years ago
Diego Biurrun
ecf026f1aa
flashsv: set reference frame type to full frame
14 years ago
Diego Biurrun
bc35ab3f7d
flashsv: replace bitstream description by a link to the specification
...
An official specification now exists and it is both more detailed and easier to
understand than the incomplete notes available here. Also remove ideas on how
to implement an encoder; these notes are already present in the encoder.
14 years ago
Diego Biurrun
9b576e4d12
flashsv: convert a debug av_log into av_dlog
14 years ago
Diego Biurrun
39884ab035
flashsv: simplify condition
14 years ago
Diego Biurrun
dbf5b95d35
flashsv: return more meaningful error values
14 years ago