*/
static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, uint8_t *buf, int buf_size)
{
- CamtasiaContext * const c = (CamtasiaContext *)avctx->priv_data;
+ CamtasiaContext * const c = avctx->priv_data;
unsigned char *encoded = (unsigned char *)buf;
unsigned char *outptr;
#ifdef CONFIG_ZLIB
*/
static int decode_init(AVCodecContext *avctx)
{
- CamtasiaContext * const c = (CamtasiaContext *)avctx->priv_data;
+ CamtasiaContext * const c = avctx->priv_data;
int zret; // Zlib return code
c->avctx = avctx;
- avctx->has_b_frames = 0;
c->pic.data[0] = NULL;
c->height = avctx->height;
case 24:
avctx->pix_fmt = PIX_FMT_BGR24;
break;
- case 32: avctx->pix_fmt = PIX_FMT_RGBA32; break;
+ case 32: avctx->pix_fmt = PIX_FMT_RGB32; break;
default: av_log(avctx, AV_LOG_ERROR, "Camtasia error: unknown depth %i bpp\n", avctx->bits_per_sample);
return -1;
}
*/
static int decode_end(AVCodecContext *avctx)
{
- CamtasiaContext * const c = (CamtasiaContext *)avctx->priv_data;
+ CamtasiaContext * const c = avctx->priv_data;
av_freep(&c->decomp_buf);