Michael Niedermayer
e47057e932
avcodec/cinepak: Check input packet size before frame reallocation
...
Reduces time spend decoding 1917/clusterfuzz-testcase-minimized-5023221273329664
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
Rl
1835ed19bb
libavcodec/cinepak.c: fix a wrong (inverted) misleading comment
...
Make the comment message understandable and correct.
8 years ago
Michael Niedermayer
121be31060
avcodec/cinepak: Check side data size before use
...
Fixes out of array read
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
Vittorio Giovara
41ed7ab45f
cosmetics: Fix spelling mistakes
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
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
Diego Biurrun
7f9f771eac
avcodec: Don't anonymously typedef structs
10 years ago
Michael Niedermayer
e7e5114c50
avcodec/cinepak: fix integer underflow
...
Fixes out of array access
Fixes: asan_heap-oob_4da0ba_6_asan_heap-oob_4da0ba_241_cvid_crash.avi
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Paul B Mahol
6dfa70f272
Correct few "ffmpeg" typos
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
10 years ago
Anton Khirnov
4a8a35bc1f
cinepak: use the AVFrame API properly.
11 years ago
Diego Biurrun
b2bed9325d
cosmetics: Group .name and .long_name together in codec/format declarations
11 years ago
Diego Biurrun
6d97484d72
avcodec: av_log_ask_for_sample() ---> 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
u-bo1b@0w.se
8d1dd5bd50
cinepak: More correct Cinepak decoder.
...
change the treatment of the strip y coordinates which previously did
not follow the description (nor did it behave like the binary decoder
on files with absolute strip offsets).
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
a3adbedf9b
cinepak: simplify
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
u-bo1b@0w.se
4e635e10e2
cinepak: Use correct colorspace.
...
The new code is also faster and more robust.
As for the performance:
old decoder + conversion to rgb: fps = 2618
old decoder, without converting to rgb: fps = 4012
new decoder, producing rgb: fps = 4502
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
0a707da37b
cinepack: print an error if cinepak_decode() failed
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Diego Biurrun
f3298f1299
Return proper error code after av_log_ask_for_sample()
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
Anton Khirnov
716d413c13
Replace PIX_FMT_* -> AV_PIX_FMT_*, PixelFormat -> AVPixelFormat
12 years ago
Martin Storsjö
1d9c2dc89a
Don't include common.h from avutil.h
...
Signed-off-by: Martin Storsjö <martin@martin.st>
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
e873c03ac7
misc Doxygen markup improvements
13 years ago
Luca Barbato
b7d939d998
cinepack: return non-generic errors
13 years ago
Michael Niedermayer
a4009c6a9a
cinepak: remove redundant coordinate checks
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Michael Niedermayer
867b496681
cinepak: check strip_size
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Michael Niedermayer
d92fea2b14
cinepak, simplify, use AV_RB24()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Michael Niedermayer
a2b51fe87c
cinepak: simplify, use FFMIN()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Michael Niedermayer
b55aa7df6b
cinepak: Fix division by zero, ask for sample if encoded_buf_size is 0
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Michael Niedermayer
7056f13a89
cinepak: remove redundant coordinate checks
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
cea0c82d9b
cinepak: check strip_size
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
f35f50b311
cinepak, simplify, use AV_RB24()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
111ffa55b7
cinepak: simplify, use FFMIN()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
4e7b3ef3b3
cinepak: Fix division by zero, ask for sample if encoded_buf_size is 0
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Mike Melanson
12d9a36481
Add another special case to the Cinepak video decoder so that it can handle the following file:
...
http://samples.mplayerhq.hu/V-codecs/CVID/bad_cinepak_frame_size.mov
This fix works around another work around which handles a different type
of odd Cinepak data.
Thanks to Matthew Hoops (clone2727 - gmail.com) for the sample and fix.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Mike Melanson
747283a078
cinepak: Add another special case so that it can handle the following file:
...
http://samples.mplayerhq.hu/V-codecs/CVID/bad_cinepak_frame_size.mov
This fix works around another work around which handles a different type
of odd Cinepak data.
Thanks to Matthew Hoops (clone2727 - gmail.com) for the sample and fix.
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Reimar Döffinger
371e165443
Try to set AVFrame.reference to correct values.
...
I am not sure these new values are correct, not am I sure
the semantics are a good idea since we do not seem to make any
use of them but they caused a lot of confusion, but this
seems to make things closer to matching the documentation.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
13 years ago
Laurent Aimar
d239d4b447
cinepak: Fix invalid read access on extra data
...
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
13 years ago
Michael Niedermayer
dd968a2edf
cinepak: detect keyframes
...
Code by DivX, Inc.
Taken from drffmpeg
Author: unknown
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Laurent Aimar
dc255275f6
Fixed invalid read access on extra data in cinepak decoder.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Anton Khirnov
ec6402b7c5
lavc: use designated initialisers for all codecs.
...
It's more readable and less prone to breakage.
14 years ago
Stefano Sabatini
01042d4123
lavc: set defaults in internal codec frames
...
This is required specifically for setting frame->format to -1,
otherwise it will be set to 0 = PIX_FMT_YUV420P and code reading
the format from the output decoded frame will get misled.
In particular fix regressions occurring with the pending vsrc_buffer
patch.
14 years ago
Kostya Shishkov
2d8591c27e
make containers pass palette change in AVPacket
...
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
14 years ago
Mans Rullgard
2912e87a6c
Replace FFmpeg with Libav in licence headers
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
14 years ago
Diego Elio Pettenò
e7e2df27f8
Add ff_ prefix to data symbols of encoders, decoders, hwaccel, parsers, bsf.
...
None of these symbols should be accessed directly, so declare them as
hidden.
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit d36beb3f69
)
14 years ago
Diego Elio Pettenò
d36beb3f69
Add ff_ prefix to data symbols of encoders, decoders, hwaccel, parsers, bsf.
...
None of these symbols should be accessed directly, so declare them as
hidden.
Signed-off-by: Mans Rullgard <mans@mansr.com>
14 years ago
Diego Biurrun
ba87f0801d
Remove explicit filename from Doxygen @file commands.
...
Passing an explicit filename to this command is only necessary if the
documentation in the @file block refers to a file different from the
one the block resides in.
Originally committed as revision 22921 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Stefano Sabatini
72415b2adb
Define AVMediaType enum, and use it instead of enum CodecType, which
...
is deprecated and will be dropped at the next major bump.
Originally committed as revision 22735 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago