diff options
author | Anne-Laure de Smit <annelaure.desmit@gmail.com> | 2009-10-01 12:20:08 +0000 |
---|---|---|
committer | Benoit Fouet <benoit.fouet@free.fr> | 2009-10-01 12:20:08 +0000 |
commit | e23dd95dc2cc1af813196c73630a66b498813f2a (patch) | |
tree | 654b2f91d07f900219c8f24bc2e72c8dd2eb261e /libavcodec | |
parent | 07f77dad7afb5254d3d45158a2623f64b9290c8f (diff) | |
download | ffmpeg-e23dd95dc2cc1af813196c73630a66b498813f2a.tar.gz |
Add support for TARGA images without RLE compression.
Patch by Anne-Laure de Smit: gmail_address(annelaure, desmit)
Originally committed as revision 20120 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/targaenc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/targaenc.c b/libavcodec/targaenc.c index b24c6f3ee2..9e481e6027 100644 --- a/libavcodec/targaenc.c +++ b/libavcodec/targaenc.c @@ -76,7 +76,7 @@ static int targa_encode_frame(AVCodecContext *avctx, unsigned char *outbuf, int buf_size, void *data){ AVFrame *p = data; - int bpp, picsize, datasize; + int bpp, picsize, datasize = -1; uint8_t *out; if(avctx->width > 0xffff || avctx->height > 0xffff) { @@ -120,6 +120,7 @@ static int targa_encode_frame(AVCodecContext *avctx, out = outbuf + 18; /* skip past the header we just output */ /* try RLE compression */ + if (avctx->coder_type != FF_CODER_TYPE_RAW) datasize = targa_encode_rle(out, picsize, p, bpp, avctx->width, avctx->height); /* if that worked well, mark the picture as RLE compressed */ |