summaryrefslogtreecommitdiff
path: root/libavcodec/lzw.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2013-11-15 10:23:04 +0100
committerAnton Khirnov <anton@khirnov.net>2013-11-21 20:53:06 +0100
commit1f3e56b6dcc163a705704e98569d4850a31d651c (patch)
tree681f2df493d90b5cd4a4b577b7c2758e02ede068 /libavcodec/lzw.c
parentc453723ad7d14abc5e82677eebaa6025fa598f08 (diff)
gifdec: convert to bytestream2
Diffstat (limited to 'libavcodec/lzw.c')
-rw-r--r--libavcodec/lzw.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/libavcodec/lzw.c b/libavcodec/lzw.c
index 2c99014c2a..016714021c 100644
--- a/libavcodec/lzw.c
+++ b/libavcodec/lzw.c
@@ -43,7 +43,7 @@ static const uint16_t mask[17] =
};
struct LZWState {
- const uint8_t *pbuf, *ebuf;
+ const uint8_t *buf_start, *pbuf, *ebuf;
int bbits;
unsigned int bbuf;
@@ -92,9 +92,10 @@ static int lzw_get_code(struct LZWState * s)
return c & s->curmask;
}
-const uint8_t* ff_lzw_cur_ptr(LZWState *p)
+int ff_lzw_size_read(LZWState *p)
{
- return ((struct LZWState*)p)->pbuf;
+ struct LZWState *s = p;
+ return s->pbuf - s->buf_start;
}
void ff_lzw_decode_tail(LZWState *p)