if (luma_width < 16 || luma_width > 640 ||
luma_height < 16 || luma_height > 480 ||
- luma_width & 3 || luma_height & 3) {
+ luma_width & 1 || luma_height & 1) {
av_log(avctx, AV_LOG_ERROR, "Invalid picture dimensions: %d x %d!\n",
luma_width, luma_height);
return AVERROR_INVALIDDATA;
ctx->planes[p].buffers[0] = av_malloc(!p ? luma_size : chroma_size);
ctx->planes[p].buffers[1] = av_malloc(!p ? luma_size : chroma_size);
- if (!ctx->planes[p].buffers[0] || !ctx->planes[p].buffers[1]) {
- free_frame_buffers(ctx);
+ if (!ctx->planes[p].buffers[0] || !ctx->planes[p].buffers[1])
return AVERROR(ENOMEM);
- }
/* fill the INTRA prediction lines with the middle pixel value = 64 */
memset(ctx->planes[p].buffers[0], 0x40, ctx->planes[p].pitch);
return 0;
}
-AVCodec ff_indeo3_decoder = {
+const AVCodec ff_indeo3_decoder = {
.name = "indeo3",
.long_name = NULL_IF_CONFIG_SMALL("Intel Indeo 3"),
.type = AVMEDIA_TYPE_VIDEO,
.close = decode_close,
.decode = decode_frame,
.capabilities = AV_CODEC_CAP_DR1,
+ .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
};