c->curfrm++;
if(c->curfrm == c->keyint)
c->curfrm = 0;
-#if FF_API_CODED_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
- avctx->coded_frame->pict_type = keyframe ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P;
- avctx->coded_frame->key_frame = keyframe;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
palptr = (avctx->pix_fmt == AV_PIX_FMT_PAL8) ? (uint32_t *)p->data[1] : NULL;
chpal = !keyframe && palptr && memcmp(palptr, c->pal2, 1024);
*/
c->pstride = FFALIGN((avctx->width + c->lrange) * c->bypp, 16);
prev_size = FFALIGN(c->lrange * c->bypp, 16) + c->pstride * (c->lrange + avctx->height + c->urange);
- prev_offset = FFALIGN(c->lrange, 16) + c->pstride * c->lrange;
+ prev_offset = FFALIGN(c->lrange * c->bypp, 16) + c->pstride * c->lrange;
if (!(c->prev_buf = av_mallocz(prev_size))) {
av_log(avctx, AV_LOG_ERROR, "Can't allocate picture.\n");
return AVERROR(ENOMEM);
return 0;
}
-AVCodec ff_zmbv_encoder = {
+const AVCodec ff_zmbv_encoder = {
.name = "zmbv",
.long_name = NULL_IF_CONFIG_SMALL("Zip Motion Blocks Video"),
.type = AVMEDIA_TYPE_VIDEO,