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
759001c534
lavc decoders: work with refcounted frames.
12 years ago
Michael Niedermayer
796012af6c
targa: Fix y check in advance_line
...
Fixes out of array accesses
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Anton Khirnov
01cbc6f6ad
targa: return meaningful error codes.
12 years ago
Michael Niedermayer
7cb46b5191
targa: use checked bytestream read
...
Fix out of array read
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
Anton Khirnov
594d4d5df3
lavc: add a wrapper for AVCodecContext.get_buffer().
...
It will be useful in the upcoming transition to refcounted AVFrames.
12 years ago
Michael Niedermayer
579d21f777
tga: check palette size earlier.
...
Fixes Ticket1895
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Paul B Mahol
2a374f06c4
targa: return more meaningful error codes
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Bobby Bingham
b56f94cc36
targa: cosmetics - add some whitespace
...
Signed-off-by: Bobby Bingham <uhmmmm@gmail.com>
12 years ago
Bobby Bingham
50787fe350
targa: remove unused context members
...
Signed-off-by: Bobby Bingham <uhmmmm@gmail.com>
12 years ago
Bobby Bingham
c2eec3df89
targa: support 2-way and 4-way interleaved files
...
Fixes ticket #701
Signed-off-by: Bobby Bingham <uhmmmm@gmail.com>
12 years ago
Bobby Bingham
3d9cdfdce7
targa: use named constants for flag values
...
Signed-off-by: Bobby Bingham <uhmmmm@gmail.com>
12 years ago
Carl Eugen Hoyos
b49d94e4f2
Support decoding of targa files with 32bit palette.
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_*
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
Ronald S. Bultje
2ad405548b
targa: convert to bytestream2.
...
Also remove some write-only variables or write-only variable
assignments, remove internal colorspace conversion to native
endianness (that can be done by swscale much more efficiently),
and some cosmetics.
13 years ago
Michael Niedermayer
43fd321252
targa: Fix input buffer size check.
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Diego Biurrun
324deaa268
Replace AVFrame pointer type punning by proper struct member assignments.
13 years ago
Diego Biurrun
562b6c744a
Remove unnecessary AVFrame pointer casts.
13 years ago
Michael Niedermayer
eb3f81e4ef
targadec: Simplify RLE out of packet check.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Carl Eugen Hoyos
34aadeaa2c
Simplify PIX_FMT_RGB555LE selection in targa decoder.
...
Suggested by Jean First.
13 years ago
Carl Eugen Hoyos
b4634a006c
Simplify targa decoding on big endian.
13 years ago
Justin Ruggles
faaebcdf6b
targa: add support for rgb555 palette
13 years ago
Carl Eugen Hoyos
6168e5812a
Fix off-by-one error when decoding rigth-to-left targa.
13 years ago
Carl Eugen Hoyos
88bbabcc00
Support decoding right-to-left targa files.
...
Fixes ticket #698 .
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
Reimar Döffinger
90cbbbc1e2
targa: Do not read colormap from files without one.
...
This is necessary because some programs writing TGA files forget
to initialize parts of the header they don't care about, resulting
in "random" data there.
The new behaviour is consistent with other programs, e.g. tgatoppm.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
14 years ago
Reimar Döffinger
efdb198e00
targa: Simplify using bytestream_get functions.
...
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
14 years ago
Mans Rullgard
551dfdde70
targa: fix big-endian build
14 years ago
Mans Rullgard
e65ab9d94f
Remove unused variables
14 years ago
Baptiste Coudurier
dbfdb288c1
Set alpha of palettes to 0xff.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
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
Ronald S. Bultje
e48fe14a54
targa: prevent integer overflow in bufsize check.
...
(cherry picked from commit 78e2380a6d
)
14 years ago
Ronald S. Bultje
78e2380a6d
targa: prevent integer overflow in bufsize check.
14 years ago
Jean-Daniel Dupas
7782cb207a
targa: fix potential buffer overreads
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit 351423ae1f
)
14 years ago
Jean-Daniel Dupas
351423ae1f
targa: fix potential buffer overreads
...
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
Stefano Sabatini
b5becbab09
Create a targa.h file to contain common definitions for targa encoder
...
and decoder.
Originally committed as revision 25464 to svn://svn.ffmpeg.org/ffmpeg/trunk
14 years ago
Stefano Sabatini
e16f217ceb
Use new imgutils.h API names, fix deprecation warnings.
...
Originally committed as revision 25058 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Stefano Sabatini
6ce9b4310c
Remove use of the deprecated function avcodec_check_dimensions(), use
...
av_check_image_size() instead.
Originally committed as revision 24711 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
Kostya Shishkov
c4396c241c
Remove useless code causing crash in Targa decoder
...
Originally committed as revision 19892 to svn://svn.ffmpeg.org/ffmpeg/trunk
16 years ago
Måns Rullgård
63613fe615
Replace WORDS_BIGENDIAN with HAVE_BIGENDIAN
...
Originally committed as revision 19508 to svn://svn.ffmpeg.org/ffmpeg/trunk
16 years ago
Baptiste Coudurier
89978e35a2
targa image decoder uses get_buffer, set CODEC_CAP_DR1
...
Originally committed as revision 19106 to svn://svn.ffmpeg.org/ffmpeg/trunk
16 years ago