projects
/
platform
/
upstream
/
libav.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f3b6010
)
Wrong state handling causing decompression errors in some cases
author
Reimar Döffinger
<Reimar.Doeffinger@gmx.de>
Sat, 14 Jan 2006 12:55:20 +0000
(12:55 +0000)
committer
Reimar Döffinger
<Reimar.Doeffinger@gmx.de>
Sat, 14 Jan 2006 12:55:20 +0000
(12:55 +0000)
Originally committed as revision 4852 to svn://svn.ffmpeg.org/ffmpeg/trunk
libavcodec/lzo.c
patch
|
blob
|
history
diff --git
a/libavcodec/lzo.c
b/libavcodec/lzo.c
index ef76d6704a10c74c8a2bd1ed6046a3dbd8b13200..46166a11336aca042b7fe18a470555ce858789fb 100644
(file)
--- a/
libavcodec/lzo.c
+++ b/
libavcodec/lzo.c
@@
-118,7
+118,6
@@
int lzo1x_decode(void *out, int *outlen, void *in, int *inlen) {
while (!c.error) {
int cnt, back;
if (x >> 4) {
- state = BACKPTR;
if (x >> 6) {
cnt = (x >> 5) - 1;
back = (get_byte(&c) << 3) + ((x >> 2) & 7) + 1;
@@
-155,10
+154,9
@@
int lzo1x_decode(void *out, int *outlen, void *in, int *inlen) {
}
copy_backptr(&c, back, cnt + 2);
cnt = x & 3;
+ state = cnt ? BACKPTR : COPY;
if (cnt)
copy(&c, cnt);
- else
- state = (state == COPY) ? BACKPTR : COPY;
x = get_byte(&c);
}
*inlen = c.in_end - c.in;