Merge commit '1f3e56b6dcc163a705704e98569d4850a31d651c'
* commit '1f3e56b6dcc163a705704e98569d4850a31d651c':
gifdec: convert to bytestream2
Conflicts:
libavcodec/gifdec.c
libavcodec/lzw.c
libavcodec/lzw.h
See: 3fd60d8049
Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
commit
7a88b7a9ad
@ -64,7 +64,6 @@ typedef struct GifState {
|
||||
int stored_bg_color;
|
||||
|
||||
GetByteContext gb;
|
||||
/* LZW compatible decoder */
|
||||
LZWState *lzw;
|
||||
|
||||
/* aux buffers */
|
||||
@ -404,7 +403,7 @@ static int gif_read_header1(GifState *s)
|
||||
|
||||
static int gif_parse_next_image(GifState *s, AVFrame *frame)
|
||||
{
|
||||
while (bytestream2_get_bytes_left(&s->gb)) {
|
||||
while (bytestream2_get_bytes_left(&s->gb) > 0) {
|
||||
int code = bytestream2_get_byte(&s->gb);
|
||||
int ret;
|
||||
|
||||
@ -502,7 +501,7 @@ static int gif_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, A
|
||||
return ret;
|
||||
*got_frame = 1;
|
||||
|
||||
return avpkt->size;
|
||||
return bytestream2_tell(&s->gb);
|
||||
}
|
||||
|
||||
static av_cold int gif_decode_close(AVCodecContext *avctx)
|
||||
|
Loading…
Reference in New Issue
Block a user