]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/proresenc_anatoliy.c
libvpx: disable unused function prototypes
[ffmpeg] / libavcodec / proresenc_anatoliy.c
index cc98c6611e548fba8cbbc3a446cf0959316d7fe9..48eb44ec167c195acbc7cf99f32ff2c335fe61cd 100644 (file)
@@ -542,14 +542,14 @@ static av_cold int prores_encode_init(AVCodecContext *avctx)
 
     if (avctx->pix_fmt != AV_PIX_FMT_YUV422P10) {
         av_log(avctx, AV_LOG_ERROR, "need YUV422P10\n");
-        return -1;
+        return AVERROR_PATCHWELCOME;
     }
     avctx->bits_per_raw_sample = 10;
 
     if (avctx->width & 0x1) {
         av_log(avctx, AV_LOG_ERROR,
                 "frame width needs to be multiple of 2\n");
-        return -1;
+        return AVERROR(EINVAL);
     }
 
     if (avctx->width > 65534 || avctx->height > 65535) {
@@ -578,7 +578,7 @@ static av_cold int prores_encode_init(AVCodecContext *avctx)
                 AV_LOG_ERROR,
                 "unknown profile %d, use [0 - apco, 1 - apcs, 2 - apcn (default), 3 - apch]\n",
                 avctx->profile);
-        return -1;
+        return AVERROR(EINVAL);
     }
 
     ff_fdctdsp_init(&ctx->fdsp, avctx);
@@ -591,6 +591,8 @@ static av_cold int prores_encode_init(AVCodecContext *avctx)
     }
 
     avctx->coded_frame = av_frame_alloc();
+    if (!avctx->coded_frame)
+        return AVERROR(ENOMEM);
     avctx->coded_frame->key_frame = 1;
     avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I;