|
|
@ -192,13 +192,12 @@ int ff_lzw_decode(LZWState *p, uint8_t *buf, int len){ |
|
|
|
oc = s->oc; |
|
|
|
oc = s->oc; |
|
|
|
fc = s->fc; |
|
|
|
fc = s->fc; |
|
|
|
|
|
|
|
|
|
|
|
while (sp > s->stack) { |
|
|
|
|
|
|
|
*buf++ = *(--sp); |
|
|
|
|
|
|
|
if ((--l) == 0) |
|
|
|
|
|
|
|
goto the_end; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (;;) { |
|
|
|
for (;;) { |
|
|
|
|
|
|
|
while (sp > s->stack) { |
|
|
|
|
|
|
|
*buf++ = *(--sp); |
|
|
|
|
|
|
|
if ((--l) == 0) |
|
|
|
|
|
|
|
goto the_end; |
|
|
|
|
|
|
|
} |
|
|
|
c = lzw_get_code(s); |
|
|
|
c = lzw_get_code(s); |
|
|
|
if (c == s->end_code) { |
|
|
|
if (c == s->end_code) { |
|
|
|
s->end_code = -1; |
|
|
|
s->end_code = -1; |
|
|
@ -242,11 +241,6 @@ int ff_lzw_decode(LZWState *p, uint8_t *buf, int len){ |
|
|
|
s->curmask = mask[++s->cursize]; |
|
|
|
s->curmask = mask[++s->cursize]; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
while (sp > s->stack) { |
|
|
|
|
|
|
|
*buf++ = *(--sp); |
|
|
|
|
|
|
|
if ((--l) == 0) |
|
|
|
|
|
|
|
goto the_end; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
the_end: |
|
|
|
the_end: |
|
|
|