c->video_size = avctx->width * avctx->height;
for (i = 0; i < 4; i++) {
c->frame[i] = av_mallocz(c->frame_size);
- if (!c->frame[i]) {
- paf_video_close(avctx);
+ if (!c->frame[i])
return AVERROR(ENOMEM);
- }
}
return 0;
.close = paf_video_close,
.decode = paf_video_decode,
.capabilities = AV_CODEC_CAP_DR1,
+ .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
};