av_frame_free(&enc->current_frame);
av_frame_free(&enc->last_frame);
- av_frame_free(&enc->avctx->coded_frame);
av_freep(&enc->tmpData);
av_freep(&enc->this_motion4);
enc->last_frame = av_frame_alloc();
enc->current_frame = av_frame_alloc();
- avctx->coded_frame = av_frame_alloc();
- if (!enc->last_frame || !enc->current_frame || !avctx->coded_frame) {
+ if (!enc->last_frame || !enc->current_frame) {
roq_encode_end(avctx);
return AVERROR(ENOMEM);
}
/* 138 bits max per 8x8 block +
* 256 codebooks*(6 bytes 2x2 + 4 bytes 4x4) + 8 bytes frame header */
size = ((enc->width * enc->height / 64) * 138 + 7) / 8 + 256 * (6 + 4) + 8;
- if ((ret = ff_alloc_packet2(avctx, pkt, size)) < 0)
+ if ((ret = ff_alloc_packet2(avctx, pkt, size, 0)) < 0)
return ret;
enc->out_buf = pkt->data;