[FFmpeg-cvslog] lavc/libxavs2.c: mark key-frame packets
hwren
git at videolan.org
Tue Jul 28 23:14:21 EEST 2020
ffmpeg | branch: master | hwren <hwrenx at 126.com> | Mon Jul 27 14:21:35 2020 +0800| [5f8555d156c96d6aa3d42762923311a73b4d469c] | committer: Michael Niedermayer
lavc/libxavs2.c: mark key-frame packets
Signed-off-by: hwren <hwrenx at 126.com>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5f8555d156c96d6aa3d42762923311a73b4d469c
---
libavcodec/libxavs2.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/libavcodec/libxavs2.c b/libavcodec/libxavs2.c
index 76b57e731e..8519f6925a 100644
--- a/libavcodec/libxavs2.c
+++ b/libavcodec/libxavs2.c
@@ -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;
More information about the ffmpeg-cvslog
mailing list