else
s->resolution = av_clip(4 - s->lowres, 0, 4);
- avctx->width = img_info[s->resolution].width;
- avctx->height = img_info[s->resolution].height;
+ ret = ff_set_dimensions(avctx, img_info[s->resolution].width, img_info[s->resolution].height);
+ if (ret < 0)
+ return ret;
if ((ret = ff_thread_get_buffer(avctx, &frame, 0)) < 0)
return ret;
.version = LIBAVUTIL_VERSION_INT,
};
-AVCodec ff_photocd_decoder = {
+const AVCodec ff_photocd_decoder = {
.name = "photocd",
.type = AVMEDIA_TYPE_VIDEO,
.id = AV_CODEC_ID_PHOTOCD,
.decode = photocd_decode_frame,
.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS,
.long_name = NULL_IF_CONFIG_SMALL("Kodak Photo CD"),
+ .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
};