Commit 5f8555d1 authored by hwren's avatar hwren Committed by Michael Niedermayer

lavc/libxavs2.c: mark key-frame packets

Signed-off-by: 's avatarhwren <hwrenx@126.com>
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 466c14d1
......@@ -223,6 +223,12 @@ static int xavs2_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
pkt->pts = cae->packet.pts;
pkt->dts = cae->packet.dts;
if (cae->packet.type == XAVS2_TYPE_IDR ||
cae->packet.type == XAVS2_TYPE_I ||
cae->packet.type == XAVS2_TYPE_KEYFRAME) {
pkt->flags |= AV_PKT_FLAG_KEY;
}
memcpy(pkt->data, cae->packet.stream, cae->packet.len);
pkt->size = cae->packet.len;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment