X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;ds=sidebyside;f=libavcodec%2Fyuv4enc.c;h=cc8846d7e52ddafb11d74b1a7808785d2b2f4a40;hb=eaf3fb877f81ac819b92e742cb8a76b8b1629978;hp=cc9ecbbf87c953b73b88db8b484f07720f29c834;hpb=157fa73992ab30b32160034e115aac21808084e2;p=ffmpeg diff --git a/libavcodec/yuv4enc.c b/libavcodec/yuv4enc.c index cc9ecbbf87c..cc8846d7e52 100644 --- a/libavcodec/yuv4enc.c +++ b/libavcodec/yuv4enc.c @@ -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, };