]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/avuienc.c
vaapi: drop unused include.
[ffmpeg] / libavcodec / avuienc.c
index acfe7bcee3e085f4b8a28c4afe99eb2beb5ecd60..b219906706fd20dab99793e02e5b4afbf128c5c1 100644 (file)
@@ -30,7 +30,7 @@ static av_cold int avui_encode_init(AVCodecContext *avctx)
         av_log(avctx, AV_LOG_ERROR, "Only 720x486 and 720x576 are supported.\n");
         return AVERROR(EINVAL);
     }
-    if (!(avctx->extradata = av_mallocz(144 + FF_INPUT_BUFFER_PADDING_SIZE)))
+    if (!(avctx->extradata = av_mallocz(144 + AV_INPUT_BUFFER_PADDING_SIZE)))
         return AVERROR(ENOMEM);
     avctx->extradata_size = 144;
     memcpy(avctx->extradata, "\0\0\0\x18""APRGAPRG0001", 16);
@@ -62,7 +62,7 @@ static int avui_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
         skip = 16;
     }
     size = 2 * avctx->width * (avctx->height + skip) + 8 * interlaced;
-    if ((ret = ff_alloc_packet(pkt, size)) < 0)
+    if ((ret = ff_alloc_packet2(avctx, pkt, size, size)) < 0)
         return ret;
     dst = pkt->data;
     if (!interlaced) {
@@ -70,9 +70,6 @@ static int avui_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
         dst += avctx->width * skip;
     }
 
-    avctx->coded_frame->key_frame = 1;
-    avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I;
-
     for (i = 0; i <= interlaced; i++) {
         uint8_t *src;
         if (interlaced && avctx->height == 486) {
@@ -101,6 +98,6 @@ AVCodec ff_avui_encoder = {
     .id           = AV_CODEC_ID_AVUI,
     .init         = avui_encode_init,
     .encode2      = avui_encode_frame,
-    .capabilities = CODEC_CAP_EXPERIMENTAL,
+    .capabilities = AV_CODEC_CAP_EXPERIMENTAL | AV_CODEC_CAP_INTRA_ONLY,
     .pix_fmts     = (const enum AVPixelFormat[]){ AV_PIX_FMT_UYVY422, AV_PIX_FMT_NONE },
 };