summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>2007-01-31 09:37:02 +0000
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>2007-01-31 09:37:02 +0000
commitd62a0c1e5db1607d3223cc18299e5f7f8f154237 (patch)
treee811ca707930d8bb0d54f76e33366652948b01c5
parentf0ee3ea619bfb643d5d060d281ee4efe0ccb99c8 (diff)
Add code to testcode to ease comparing with liblzo.
Originally committed as revision 7775 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavcodec/lzo.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libavcodec/lzo.c b/libavcodec/lzo.c
index 0ee7eca042..e4a1111b5e 100644
--- a/libavcodec/lzo.c
+++ b/libavcodec/lzo.c
@@ -255,7 +255,13 @@ int main(int argc, char *argv[]) {
for (i = 0; i < 300; i++) {
START_TIMER
inlen = clen; outlen = MAXSZ;
+#ifdef LIBLZO
+ if (lzo1x_decompress_safe(comp, inlen, decomp, &outlen, NULL))
+#elif defined(LIBLZO_UNSAFE)
+ if (lzo1x_decompress(comp, inlen, decomp, &outlen, NULL))
+#else
if (lzo1x_decode(decomp, &outlen, comp, &inlen))
+#endif
av_log(NULL, AV_LOG_ERROR, "decompression error\n");
STOP_TIMER("lzod")
}