vavp9enc: Set the correct buffer flag for output

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6688>
This commit is contained in:
He Junyan 2024-04-19 00:25:25 +08:00 committed by GStreamer Marge Bot
parent 9bd73987f6
commit 8d0a1a0c56

View file

@ -2727,6 +2727,15 @@ gst_va_vp9_enc_prepare_output (GstVaBaseEnc * base,
frame_enc->flags |= FRAME_FLAG_ALREADY_OUTPUTTED; frame_enc->flags |= FRAME_FLAG_ALREADY_OUTPUTTED;
} }
GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_MARKER);
if (frame_enc->frame_num == 0) {
GST_VIDEO_CODEC_FRAME_SET_SYNC_POINT (frame);
GST_BUFFER_FLAG_UNSET (buf, GST_BUFFER_FLAG_DELTA_UNIT);
} else {
GST_VIDEO_CODEC_FRAME_UNSET_SYNC_POINT (frame);
GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_DELTA_UNIT);
}
gst_buffer_replace (&frame->output_buffer, buf); gst_buffer_replace (&frame->output_buffer, buf);
gst_clear_buffer (&buf); gst_clear_buffer (&buf);