]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/pictordec.c
nvenc: Generate AUD NAL units for better compatiblity
[ffmpeg] / libavcodec / pictordec.c
index 020424ddae300d25e24302d5429ebce41da6ff8d..9477bc402d2953b853bc133ac8d7f88e2f7a707a 100644 (file)
@@ -141,9 +141,9 @@ static int decode_frame(AVCodecContext *avctx,
     avctx->pix_fmt = AV_PIX_FMT_PAL8;
 
     if (s->width != avctx->width && s->height != avctx->height) {
-        if (av_image_check_size(s->width, s->height, 0, avctx) < 0)
-            return -1;
-        avcodec_set_dimensions(avctx, s->width, s->height);
+        ret = ff_set_dimensions(avctx, s->width, s->height);
+        if (ret < 0)
+            return ret;
     }
 
     if ((ret = ff_get_buffer(avctx, frame, 0)) < 0) {
@@ -244,10 +244,10 @@ finish:
 
 AVCodec ff_pictor_decoder = {
     .name           = "pictor",
+    .long_name      = NULL_IF_CONFIG_SMALL("Pictor/PC Paint"),
     .type           = AVMEDIA_TYPE_VIDEO,
     .id             = AV_CODEC_ID_PICTOR,
     .priv_data_size = sizeof(PicContext),
     .decode         = decode_frame,
-    .capabilities   = CODEC_CAP_DR1,
-    .long_name      = NULL_IF_CONFIG_SMALL("Pictor/PC Paint"),
+    .capabilities   = AV_CODEC_CAP_DR1,
 };