X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;ds=sidebyside;f=libavcodec%2Faasc.c;h=1e599e0daa889528f76c4526acbdc70ef5051d05;hb=99e3913d39787f7a88ca70a9b0504d586a20b3fe;hp=6c8e3166e4b8f2e0f586fbbca1f303333ead242c;hpb=b78e7197a81e193827cf2408fe25bc1f14843a72;p=ffmpeg diff --git a/libavcodec/aasc.c b/libavcodec/aasc.c index 6c8e3166e4b..1e599e0daa8 100644 --- a/libavcodec/aasc.c +++ b/libavcodec/aasc.c @@ -1,5 +1,5 @@ /* - * Autodesc RLE Decoder + * Autodesk RLE Decoder * Copyright (C) 2005 the ffmpeg project * * This file is part of FFmpeg. @@ -21,14 +21,13 @@ /** * @file aasc.c - * Autodesc RLE Video Decoder by Konstantin Shishkov + * Autodesk RLE Video Decoder by Konstantin Shishkov */ #include #include #include -#include "common.h" #include "avcodec.h" #include "dsputil.h" @@ -45,14 +44,13 @@ typedef struct AascContext { } \ stream_byte = buf[stream_ptr++]; -static int aasc_decode_init(AVCodecContext *avctx) +static av_cold int aasc_decode_init(AVCodecContext *avctx) { - AascContext *s = (AascContext *)avctx->priv_data; + AascContext *s = avctx->priv_data; s->avctx = avctx; avctx->pix_fmt = PIX_FMT_BGR24; - avctx->has_b_frames = 0; s->frame.data[0] = NULL; return 0; @@ -60,9 +58,9 @@ static int aasc_decode_init(AVCodecContext *avctx) static int aasc_decode_frame(AVCodecContext *avctx, void *data, int *data_size, - uint8_t *buf, int buf_size) + const uint8_t *buf, int buf_size) { - AascContext *s = (AascContext *)avctx->priv_data; + AascContext *s = avctx->priv_data; int stream_ptr = 4; unsigned char rle_code; unsigned char stream_byte; @@ -152,9 +150,9 @@ static int aasc_decode_frame(AVCodecContext *avctx, return buf_size; } -static int aasc_decode_end(AVCodecContext *avctx) +static av_cold int aasc_decode_end(AVCodecContext *avctx) { - AascContext *s = (AascContext *)avctx->priv_data; + AascContext *s = avctx->priv_data; /* release the last frame */ if (s->frame.data[0]) @@ -173,4 +171,5 @@ AVCodec aasc_decoder = { aasc_decode_end, aasc_decode_frame, CODEC_CAP_DR1, + .long_name = "Autodesk RLE", };