va: h264enc: Make AUD the first NAL unit

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2796>
This commit is contained in:
Eric Knapp 2022-07-26 13:59:33 -04:00 committed by GStreamer Marge Bot
parent e3e98da727
commit d11a0d04ec

View file

@ -2702,6 +2702,12 @@ _encode_one_frame (GstVaH264Enc * self, GstVideoCodecFrame * gst_frame)
frame = _enc_frame (gst_frame);
if (self->prop.aud) {
if ((self->packed_headers & VA_ENC_PACKED_HEADER_RAW_DATA)
&& !_add_aud (self, frame))
return FALSE;
}
/* Repeat the SPS for IDR. */
if (frame->poc == 0) {
VAEncSequenceParameterBufferH264 sequence;
@ -2739,12 +2745,6 @@ _encode_one_frame (GstVaH264Enc * self, GstVideoCodecFrame * gst_frame)
return FALSE;
}
if (self->prop.aud) {
if ((self->packed_headers & VA_ENC_PACKED_HEADER_RAW_DATA)
&& !_add_aud (self, frame))
return FALSE;
}
/* Non I frame, construct reference list. */
if (frame->type != GST_H264_I_SLICE) {
GstVaH264EncFrame *vaf;