static int decode_frame(AVCodecContext * avctx, void *data, int *data_size, uint8_t * buf,
int buf_size)
{
- KmvcContext *const ctx = (KmvcContext *) avctx->priv_data;
+ KmvcContext *const ctx = avctx->priv_data;
uint8_t *out, *src;
int i;
int header;
*/
static int decode_init(AVCodecContext * avctx)
{
- KmvcContext *const c = (KmvcContext *) avctx->priv_data;
+ KmvcContext *const c = avctx->priv_data;
int i;
c->avctx = avctx;
- avctx->has_b_frames = 0;
c->pic.data[0] = NULL;
av_log(NULL, 0, "Extradata missing, decoding may not work properly...\n");
c->palsize = 127;
} else {
- c->palsize = LE_16(avctx->extradata + 10);
+ c->palsize = AV_RL16(avctx->extradata + 10);
}
if (avctx->extradata_size == 1036) { // palette in extradata
uint8_t *src = avctx->extradata + 12;
for (i = 0; i < 256; i++) {
- c->pal[i] = LE_32(src);
+ c->pal[i] = AV_RL32(src);
src += 4;
}
c->setpal = 1;
*/
static int decode_end(AVCodecContext * avctx)
{
- KmvcContext *const c = (KmvcContext *) avctx->priv_data;
+ KmvcContext *const c = avctx->priv_data;
av_freep(&c->frm0);
av_freep(&c->frm1);