From 80286671c5594957d74120b3b5f47b774e98c661 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Sun, 19 Jul 2020 20:29:29 +0200 Subject: 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 --- libavcodec/lzw.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'libavcodec/lzw.h') diff --git a/libavcodec/lzw.h b/libavcodec/lzw.h index 6af8a6b83a..dae4d05225 100644 --- a/libavcodec/lzw.h +++ b/libavcodec/lzw.h @@ -54,10 +54,8 @@ struct LZWEncodeState; extern const int ff_lzw_encode_state_size; void ff_lzw_encode_init(struct LZWEncodeState *s, uint8_t *outbuf, int outsize, - int maxbits, enum FF_LZW_MODES mode, - void (*lzw_put_bits)(struct PutBitContext *, int, unsigned int)); + int maxbits, enum FF_LZW_MODES mode, int little_endian); int ff_lzw_encode(struct LZWEncodeState * s, const uint8_t * inbuf, int insize); -int ff_lzw_encode_flush(struct LZWEncodeState *s, - void (*lzw_flush_put_bits)(struct PutBitContext *)); +int ff_lzw_encode_flush(struct LZWEncodeState *s); #endif /* AVCODEC_LZW_H */ -- cgit v1.2.3