int buf_size = avpkt->size;
TiffContext * const s = avctx->priv_data;
AVFrame *picture = data;
- AVFrame * const p= (AVFrame*)&s->picture;
+ AVFrame * const p = &s->picture;
const uint8_t *orig_buf = buf, *end_buf = buf + buf_size;
unsigned off;
int id, le, ret;
av_log(avctx, AV_LOG_ERROR, "The answer to life, universe and everything is not correct!\n");
return -1;
}
+ // Reset these pointers so we can tell if they were set this frame
+ s->stripsizes = s->stripdata = NULL;
/* parse image file directory */
off = tget_long(&buf, le);
if (off >= UINT_MAX - 14 || end_buf - orig_buf < off + 14) {
dst += s->picture.linesize[0];
}
}
- *picture= *(AVFrame*)&s->picture;
+ *picture = s->picture;
*data_size = sizeof(AVPicture);
return buf_size;
s->width = 0;
s->height = 0;
s->avctx = avctx;
- avcodec_get_frame_defaults((AVFrame*)&s->picture);
- avctx->coded_frame= (AVFrame*)&s->picture;
+ avcodec_get_frame_defaults(&s->picture);
+ avctx->coded_frame = &s->picture;
ff_lzw_decode_open(&s->lzw);
ff_ccitt_unpack_init();