]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/yuv4enc.c
Merge commit '8c75ba55a4367c854b577c849ea2195bd78c4c81'
[ffmpeg] / libavcodec / yuv4enc.c
index cc9ecbbf87c953b73b88db8b484f07720f29c834..cc8846d7e52ddafb11d74b1a7808785d2b2f4a40 100644 (file)
@@ -35,13 +35,10 @@ static int yuv4_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
     uint8_t *y, *u, *v;
     int i, j, ret;
 
-    if ((ret = ff_alloc_packet2(avctx, pkt, 6 * (avctx->width + 1 >> 1) * (avctx->height + 1 >> 1))) < 0)
+    if ((ret = ff_alloc_packet2(avctx, pkt, 6 * (avctx->width + 1 >> 1) * (avctx->height + 1 >> 1), 0)) < 0)
         return ret;
     dst = pkt->data;
 
-    avctx->coded_frame->key_frame = 1;
-    avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I;
-
     y = pic->data[0];
     u = pic->data[1];
     v = pic->data[2];
@@ -79,4 +76,5 @@ AVCodec ff_yuv4_encoder = {
     .encode2      = yuv4_encode_frame,
     .close        = yuv4_encode_close,
     .pix_fmts     = (const enum AVPixelFormat[]){ AV_PIX_FMT_YUV420P, AV_PIX_FMT_NONE },
+    .capabilities = AV_CODEC_CAP_INTRA_ONLY,
 };