X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fflashsv.c;h=28579b79b3c47d8164991567e00a679c27e62b17;hb=8629e7562d73feea8b840e1ec11a79e9ae1558f8;hp=515085c0288a4d4694cc4f1d501f36437808fdcb;hpb=587d07227eed8021ac38dc352ba72ee5b6714380;p=ffmpeg diff --git a/libavcodec/flashsv.c b/libavcodec/flashsv.c index 515085c0288..28579b79b3c 100644 --- a/libavcodec/flashsv.c +++ b/libavcodec/flashsv.c @@ -50,7 +50,6 @@ #include #include -#include "common.h" #include "avcodec.h" #include "bitstream.h" @@ -80,9 +79,9 @@ static void copy_region(uint8_t *sptr, uint8_t *dptr, } -static int flashsv_decode_init(AVCodecContext *avctx) +static av_cold int flashsv_decode_init(AVCodecContext *avctx) { - FlashSVContext *s = (FlashSVContext *)avctx->priv_data; + FlashSVContext *s = avctx->priv_data; int zret; // Zlib return code s->avctx = avctx; @@ -103,9 +102,9 @@ static int flashsv_decode_init(AVCodecContext *avctx) static int flashsv_decode_frame(AVCodecContext *avctx, void *data, int *data_size, - uint8_t *buf, int buf_size) + const uint8_t *buf, int buf_size) { - FlashSVContext *s = (FlashSVContext *)avctx->priv_data; + FlashSVContext *s = avctx->priv_data; int h_blocks, v_blocks, h_part, v_part, i, j; GetBitContext gb; @@ -201,7 +200,7 @@ static int flashsv_decode_frame(AVCodecContext *avctx, ret = inflate(&(s->zstream), Z_FINISH); if (ret == Z_DATA_ERROR) { - av_log(avctx, AV_LOG_ERROR, "Zlib resync occured\n"); + av_log(avctx, AV_LOG_ERROR, "Zlib resync occurred\n"); inflateSync(&(s->zstream)); ret = inflate(&(s->zstream), Z_FINISH); } @@ -229,9 +228,9 @@ static int flashsv_decode_frame(AVCodecContext *avctx, } -static int flashsv_decode_end(AVCodecContext *avctx) +static av_cold int flashsv_decode_end(AVCodecContext *avctx) { - FlashSVContext *s = (FlashSVContext *)avctx->priv_data; + FlashSVContext *s = avctx->priv_data; inflateEnd(&(s->zstream)); /* release the frame if needed */ if (s->frame.data[0])