From patchwork Sun Jul 19 16:15:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Steinar H. Gunderson" X-Patchwork-Id: 21185 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 3A116449B12 for ; Sun, 19 Jul 2020 19:15:55 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 2325C68B81C; Sun, 19 Jul 2020 19:15:55 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from pannekake.samfundet.no (pannekake.samfundet.no [193.35.52.50]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id CEC0E68B2AB for ; Sun, 19 Jul 2020 19:15:48 +0300 (EEST) Received: from sesse by pannekake.samfundet.no with local (Exim 4.92) (envelope-from ) id 1jxByd-00024Q-Uz; Sun, 19 Jul 2020 18:15:48 +0200 From: "Steinar H. Gunderson" To: ffmpeg-devel@ffmpeg.org Date: Sun, 19 Jul 2020 18:15:42 +0200 Message-Id: <20200719161543.7886-1-steinar+ffmpeg@gunderson.no> X-Mailer: git-send-email 2.20.1 In-Reply-To: References: MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] avcodec/put_bits: Fix LZW warning X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: "Steinar H. Gunderson" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" lzwenc stores a function pointer to either put_bits or put_bits_le. Update the function pointer's prototype after the recent change. --- libavcodec/lzw.h | 4 +++- libavcodec/lzwenc.c | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/libavcodec/lzw.h b/libavcodec/lzw.h index 6af8a6b83a..400a479809 100644 --- a/libavcodec/lzw.h +++ b/libavcodec/lzw.h @@ -32,6 +32,8 @@ #include +#include "put_bits.h" + struct PutBitContext; enum FF_LZW_MODES{ @@ -55,7 +57,7 @@ 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)); + void (*lzw_put_bits)(struct PutBitContext *, int, BitBuf)); 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 *)); diff --git a/libavcodec/lzwenc.c b/libavcodec/lzwenc.c index 03080ee587..c1b96905e8 100644 --- a/libavcodec/lzwenc.c +++ b/libavcodec/lzwenc.c @@ -60,7 +60,7 @@ typedef struct LZWEncodeState { int output_bytes; ///< Number of written bytes int last_code; ///< Value of last output code or LZW_PREFIX_EMPTY enum FF_LZW_MODES mode; ///< TIFF or GIF - void (*put_bits)(PutBitContext *, int, unsigned); ///< GIF is LE while TIFF is BE + void (*put_bits)(PutBitContext *, int, BitBuf); ///< GIF is LE while TIFF is BE }LZWEncodeState; @@ -201,7 +201,7 @@ static int writtenBytes(LZWEncodeState *s){ */ void ff_lzw_encode_init(LZWEncodeState *s, uint8_t *outbuf, int outsize, int maxbits, enum FF_LZW_MODES mode, - void (*lzw_put_bits)(PutBitContext *, int, unsigned)) + void (*lzw_put_bits)(PutBitContext *, int, BitBuf)) { s->clear_code = 256; s->end_code = 257;