* You should have received a copy of the GNU Lesser General Public
* License along with FFmpeg; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
*/
/**
#include <stdio.h>
#include <stdlib.h>
-#include "common.h"
#include "avcodec.h"
#include <zlib.h>
return 0;
}
-static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, uint8_t *buf, int buf_size)
+static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, const uint8_t *buf, int buf_size)
{
- DxaDecContext * const c = (DxaDecContext *)avctx->priv_data;
+ DxaDecContext * const c = avctx->priv_data;
uint8_t *outptr, *srcptr, *tmpptr;
unsigned long dsize;
int i, j, compr;
return orig_buf_size;
}
-static int decode_init(AVCodecContext *avctx)
+static av_cold int decode_init(AVCodecContext *avctx)
{
- DxaDecContext * const c = (DxaDecContext *)avctx->priv_data;
+ DxaDecContext * const c = avctx->priv_data;
c->avctx = avctx;
avctx->pix_fmt = PIX_FMT_PAL8;
return 0;
}
-static int decode_end(AVCodecContext *avctx)
+static av_cold int decode_end(AVCodecContext *avctx)
{
- DxaDecContext * const c = (DxaDecContext *)avctx->priv_data;
+ DxaDecContext * const c = avctx->priv_data;
av_freep(&c->decomp_buf);
if(c->prev.data[0])
decode_init,
NULL,
decode_end,
- decode_frame
+ decode_frame,
+ .long_name = NULL_IF_CONFIG_SMALL("Feeble Files/ScummVM DXA"),
};