summaryrefslogtreecommitdiff
path: root/libavcodec/tiffenc.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/tiffenc.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/tiffenc.c')
-rw-r--r--libavcodec/tiffenc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/tiffenc.c b/libavcodec/tiffenc.c
index a122f51de4..6661e59d31 100644
--- a/libavcodec/tiffenc.c
+++ b/libavcodec/tiffenc.c
@@ -421,7 +421,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
if (s->compr == TIFF_LZW) {
ff_lzw_encode_init(s->lzws, ptr,
s->buf_size - (*s->buf - s->buf_start),
- 12, FF_LZW_TIFF, put_bits);
+ 12, FF_LZW_TIFF, 0);
}
s->strip_offsets[i / s->rps] = ptr - pkt->data;
}
@@ -440,7 +440,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
ptr += ret;
if (s->compr == TIFF_LZW &&
(i == s->height - 1 || i % s->rps == s->rps - 1)) {
- ret = ff_lzw_encode_flush(s->lzws, flush_put_bits);
+ ret = ff_lzw_encode_flush(s->lzws);
s->strip_sizes[(i / s->rps)] += ret;
ptr += ret;
}