Michael Niedermayer
e45226adc4
avcodec/truemotion1: Fix multiple runtime error: signed integer overflow: 1246906962 * 2 cannot be represented in type 'int'
...
Fixes: 1616/clusterfuzz-testcase-minimized-5119196578971648
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
db5fae3229
avcodec/truemotion1: Fix multiple runtime error: left shift of negative value -1
...
Fixes: 1446/clusterfuzz-testcase-minimized-5577409124368384
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
Andreas Cadhalpun
46e75617d9
truemotion1: fix leaking frame on init failure
...
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
8 years ago
Michael Niedermayer
a813cdda48
avcodec/truemotion1: Initialize mb_change_byte only when needed
...
Fixes out of array read
Fixes: d92114d8c2a019b8a6e50cd2a7301b54/asan_heap-oob_26bf563_60_1d3420277533de9dbf8aba3f93af346f.avi
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Michael Niedermayer
151312890c
avcodec/truemotion1: Simplify code using AV_PIX_FMT_0RGB32
...
Suggested-by: carl
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Michael Niedermayer
a4d17c9a70
avcodec/truemotion1: use BGR0/0RGB
...
The alpha channel in the fate sample contains random trash, not alpha
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Michael Niedermayer
cf818be4f2
avcodec/truemotion1: Fix undefined behavior (left shift of negative value)
...
Fixes: asan_heap-oob_26f6853_862_cov_585961513_sonic3dblast_intro-partial.avi
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Michael Niedermayer
63fb5a6aef
avcodec/truemotion1: Check for even width
...
Fixes out of array access
Fixes: 87196d8bbc633629fc9dd851fce73e70/asan_heap-oob_26f6853_862_cov_585961513_sonic3dblast_intro-partial.avi
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
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
Justin Ruggles
9e500efdbe
Add av_image_check_sar() and use it to validate SAR
11 years ago
Anton Khirnov
2240e2078d
truemotion1: check the header size
...
Fixes invalid reads.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org
11 years ago
Anton Khirnov
c918e08b9c
truemotion1: make sure index does not go out of bounds
...
Fixes invalid reads.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org
11 years ago
Anton Khirnov
42d40fd28c
truemotion1: use the AVFrame API properly.
11 years ago
Anton Khirnov
db92e4ea8d
truemotion1: stop using deprecated avcodec_set_dimensions
11 years ago
Diego Biurrun
b2bed9325d
cosmetics: Group .name and .long_name together in codec/format declarations
11 years ago
Paul B Mahol
b8ff4f5ea3
truemotion1: check av_fast_malloc() return value
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
11 years ago
Paul B Mahol
83b915d495
truemotion1: use av_freep()
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
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
Diego Biurrun
c242bbd8b6
Remove unnecessary dsputil.h #includes
12 years ago
Anton Khirnov
b61e0b99df
truemotion1: return meaningful error codes
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
Michael Niedermayer
fd4c1c0b70
truemotion1: Check index, fix out of array read
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Diego Biurrun
4466d0e84b
truemotion1: remove disabled code
13 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
a92be9b856
Replace memset(0) by zero initializations.
...
Also remove one pointless zero initialization in rangecoder.c.
13 years ago
Michael Niedermayer
e7b43e8e84
truemotion1: Check input buffer size against header size.
...
Fixes overread.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
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
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
Diego Biurrun
70fb031ce2
Use av_log_ask_for_sample() where appropriate.
14 years ago
Mans Rullgard
2912e87a6c
Replace FFmpeg with Libav in licence headers
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
14 years ago
Reinhard Tartler
7ffe76e540
Merge libavcore into libavutil
...
Done to keep ABI compatible. Otherwise this is just silly
14 years ago
Reinhard Tartler
737eb5976f
Merge libavcore into libavutil
...
It is pretty hopeless that other considerable projects will adopt
libavutil alone in other projects. Projects that need small footprint
are better off with more specialized libraries such as gnulib or rather
just copy the necessary parts that they need. With this in mind, nobody
is helped by having libavutil and libavcore split. In order to ease
maintenance inside and around FFmpeg and to reduce confusion where to
put common code, avcore's functionality is merged (back) to avutil.
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
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
Daniel Kang
8e37a1deb3
Check for vectable ID > 0, fixes issue 2508.
...
Patch by Daniel Kang, daniel.d.kang at gmail
Originally committed as revision 26294 to svn://svn.ffmpeg.org/ffmpeg/trunk
14 years ago
Reimar Döffinger
e75f418cf2
Fix aspect for 24bpp TM1 samples.
...
Originally committed as revision 25663 to svn://svn.ffmpeg.org/ffmpeg/trunk
14 years ago
Reimar Döffinger
a940dc6912
Fix decoding of 24 bpp TM1 (except for aspect).
...
Originally committed as revision 25662 to svn://svn.ffmpeg.org/ffmpeg/trunk
14 years ago
Reimar Döffinger
f1c5301413
100l, calculate mb_change_bits_row_size from the update width.
...
Originally committed as revision 25661 to svn://svn.ffmpeg.org/ffmpeg/trunk
14 years ago
Reimar Döffinger
97113c2178
Support mid-stream resolution/format changes for TM1.
...
This makes it easier to fix playback of 24 bit formats.
Originally committed as revision 25660 to svn://svn.ffmpeg.org/ffmpeg/trunk
14 years ago
Reimar Döffinger
2a86d4b905
The 24-bit ydt also should not depend on endianness,
...
since all of it ends up in a single 32-bit pixel.
This seems likely to be wrong though, since it is different
from the 15 and 16 bit modes and might explain the half-width
issue for 24 bit truemotion.
Originally committed as revision 24864 to svn://svn.ffmpeg.org/ffmpeg/trunk
14 years ago
Reimar Döffinger
47af623967
Since the 24 bit format is decoded to endian-dependant
...
BGR32 and not BGR24, do not swap red and blue on big-endian
for this format as well.
Originally committed as revision 24863 to svn://svn.ffmpeg.org/ffmpeg/trunk
14 years ago
Reimar Döffinger
751c5093c6
Do not swap red and blue when decoding truemotion
...
on big-endian.
Originally committed as revision 24862 to svn://svn.ffmpeg.org/ffmpeg/trunk
14 years ago