enc->last_frame = av_frame_alloc();
enc->current_frame = av_frame_alloc();
- if (!enc->last_frame || !enc->current_frame) {
- roq_encode_end(avctx);
+ if (!enc->last_frame || !enc->current_frame)
return AVERROR(ENOMEM);
- }
enc->tmpData = av_malloc(sizeof(RoqTempdata));
av_malloc_array ((enc->width*enc->height/64), sizeof(motion_vect));
if (!enc->tmpData || !enc->this_motion4 || !enc->last_motion4 ||
- !enc->this_motion8 || !enc->last_motion8) {
- roq_encode_end(avctx);
+ !enc->this_motion8 || !enc->last_motion8)
return AVERROR(ENOMEM);
- }
return 0;
}
.pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_YUVJ444P,
AV_PIX_FMT_NONE },
.priv_class = &roq_class,
+ .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
};