vah265enc: Set the correct buffer flag for output

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6764>
This commit is contained in:
He Junyan 2024-04-22 15:03:56 +08:00 committed by GStreamer Marge Bot
parent bda1aa3559
commit ca49577cbb

View file

@ -4660,6 +4660,16 @@ gst_va_h265_enc_prepare_output (GstVaBaseEnc * base,
return FALSE;
}
GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_MARKER);
if (frame_enc->poc == 0) {
GST_VIDEO_CODEC_FRAME_SET_SYNC_POINT (frame);
GST_BUFFER_FLAG_UNSET (buf, GST_BUFFER_FLAG_DELTA_UNIT);
GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_HEADER);
} 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_clear_buffer (&buf);