From ad15fc91696c6bcc796ae0b35e815aa800b49851 Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?= Date: Tue, 9 Aug 2022 12:29:34 +0200 Subject: [PATCH] vah264enc: Set codec frame sync point if IDR This flag is used by GstVideoEncoder base class for certain configurations. Part-of: --- subprojects/gst-plugins-bad/sys/va/gstvah264enc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/subprojects/gst-plugins-bad/sys/va/gstvah264enc.c b/subprojects/gst-plugins-bad/sys/va/gstvah264enc.c index 33dfc24..c06990a 100644 --- a/subprojects/gst-plugins-bad/sys/va/gstvah264enc.c +++ b/subprojects/gst-plugins-bad/sys/va/gstvah264enc.c @@ -1623,6 +1623,7 @@ _push_one_frame (GstVaBaseEnc * base, GstVideoCodecFrame * gst_frame, frame->poc = ((self->gop.cur_frame_index * 2) % self->gop.max_pic_order_cnt); + /* TODO: move most this logic onto vabaseenc class */ if (self->gop.cur_frame_index == 0) { g_assert (frame->poc == 0); GST_LOG_OBJECT (self, "system_frame_number: %d, an IDR frame, starts" @@ -1630,6 +1631,8 @@ _push_one_frame (GstVaBaseEnc * base, GstVideoCodecFrame * gst_frame, g_queue_clear_full (&base->ref_list, (GDestroyNotify) gst_video_codec_frame_unref); + + GST_VIDEO_CODEC_FRAME_SET_SYNC_POINT (gst_frame); } frame->type = self->gop.frame_types[self->gop.cur_frame_index].slice_type; -- 2.7.4