summaryrefslogtreecommitdiff
path: root/libavcodec/gif.c
diff options
context:
space:
mode:
authorSteinar H. Gunderson <steinar+ffmpeg@gunderson.no>2020-07-19 20:29:29 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2020-07-20 18:41:09 +0200
commit80286671c5594957d74120b3b5f47b774e98c661 (patch)
tree420f52f83b6c03a4bdab55a7e4516e5448c8a03a /libavcodec/gif.c
parentc4c989c7ca06619e29afefe3d3be9e36c1614ebb (diff)
avcodec/put_bits: Fix LZW warning
lzwenc stores a function pointer to either put_bits or put_bits_le; however, after the recent change, the function pointer's prototype would depend on BitBuf. BitBuf is defined in put_bits.h, whose definition depends on whether BITSTREAM_WRITER_LE is #defined or not. For safety, we set a boolean flag for little/big endian instead, which also allows the definition to be inlined. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/gif.c')
-rw-r--r--libavcodec/gif.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/gif.c b/libavcodec/gif.c
index e2242d0438..e92dfa65d7 100644
--- a/libavcodec/gif.c
+++ b/libavcodec/gif.c
@@ -344,7 +344,7 @@ static int gif_image_write_image(AVCodecContext *avctx,
bytestream_put_byte(bytestream, 0x08);
ff_lzw_encode_init(s->lzw, s->buf, s->buf_size,
- 12, FF_LZW_GIF, put_bits);
+ 12, FF_LZW_GIF, 1);
ptr = buf + y_start*linesize + x_start;
if (honor_transparency) {
@@ -366,7 +366,7 @@ static int gif_image_write_image(AVCodecContext *avctx,
ptr += linesize;
}
}
- len += ff_lzw_encode_flush(s->lzw, flush_put_bits);
+ len += ff_lzw_encode_flush(s->lzw);
ptr = s->buf;
while (len > 0) {