summaryrefslogtreecommitdiff
path: root/libavcodec/cscd.c
diff options
context:
space:
mode:
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>2006-01-12 17:52:41 +0000
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>2006-01-12 17:52:41 +0000
commit517840c65434b42fb8784ad1ce4a0301d5d6c36d (patch)
tree0665e82179aad38062265448e0b811e48c036002 /libavcodec/cscd.c
parent1015631b79b7bc40dcae6f8f8d7c5787319dc540 (diff)
Our own LZO (1X) implementation, under LGPL and optimized for readability.
Tested on CamStudio sample files. Originally committed as revision 4840 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/cscd.c')
-rw-r--r--libavcodec/cscd.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/libavcodec/cscd.c b/libavcodec/cscd.c
index fdc336d4dc..3e64123515 100644
--- a/libavcodec/cscd.c
+++ b/libavcodec/cscd.c
@@ -25,9 +25,7 @@
#ifdef CONFIG_ZLIB
#include <zlib.h>
#endif
-#ifdef CONFIG_LZO
-#include <lzo1x.h>
-#endif
+#include "lzo.h"
typedef struct {
AVFrame pic;
@@ -158,16 +156,10 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
// decompress data
switch ((buf[0] >> 1) & 7) {
case 0: { // lzo compression
-#ifdef CONFIG_LZO
- unsigned int dlen = c->decomp_size;
- if (lzo1x_decompress_safe(&buf[2], buf_size - 2,
- c->decomp_buf, &dlen, NULL) != LZO_E_OK)
+ int outlen = c->decomp_size, inlen = buf_size - 2;
+ if (lzo1x_decode(c->decomp_buf, &outlen, &buf[2], &inlen))
av_log(avctx, AV_LOG_ERROR, "error during lzo decompression\n");
break;
-#else
- av_log(avctx, AV_LOG_ERROR, "compiled without lzo (GPL) support\n");
- return -1;
-#endif
}
case 1: { // zlib compression
#ifdef CONFIG_ZLIB