s->pictures[0] = av_frame_alloc();
s->pictures[1] = av_frame_alloc();
- if (!s->pictures[0] || !s->pictures[1]) {
- decode_end(avctx);
+ if (!s->pictures[0] || !s->pictures[1])
return AVERROR(ENOMEM);
- }
return 0;
}
c93->currentpic ^= 1;
- if ((ret = ff_reget_buffer(avctx, newpic)) < 0)
+ if ((ret = ff_reget_buffer(avctx, newpic, 0)) < 0)
return ret;
stride = newpic->linesize[0];
return buf_size;
}
-AVCodec ff_c93_decoder = {
+const AVCodec ff_c93_decoder = {
.name = "c93",
.long_name = NULL_IF_CONFIG_SMALL("Interplay C93"),
.type = AVMEDIA_TYPE_VIDEO,
.close = decode_end,
.decode = decode_frame,
.capabilities = AV_CODEC_CAP_DR1,
- .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
+ .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
};