]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/photocd.c
tests/fate: add tests for PNG side/meta data
[ffmpeg] / libavcodec / photocd.c
index 8fd4536a650bf43b48f70c4adb760158cd4074e4..408ddeaac8561e2bb47fb1e0e8f11873b2ed0d89 100644 (file)
@@ -323,8 +323,9 @@ static int photocd_decode_frame(AVCodecContext *avctx, void *data,
     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;
@@ -468,4 +469,5 @@ AVCodec ff_photocd_decoder = {
     .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,
 };