diff --git a/src/gallium/drivers/d3d12/d3d12_video_encoder_nalu_writer_h264.cpp b/src/gallium/drivers/d3d12/d3d12_video_encoder_nalu_writer_h264.cpp index 7a569bd0ed6..64de80b4301 100644 --- a/src/gallium/drivers/d3d12/d3d12_video_encoder_nalu_writer_h264.cpp +++ b/src/gallium/drivers/d3d12/d3d12_video_encoder_nalu_writer_h264.cpp @@ -555,6 +555,8 @@ d3d12_video_nalu_writer_h264::write_sei_nalu(H264_SEI_MESSAGE sei_ assert(false); } + sei_payload_bitstream.set_start_code_prevention(true); + switch (sei_message.payload_type) { case H264_SEI_SCALABILITY_INFO: @@ -618,8 +620,6 @@ d3d12_video_nalu_writer_h264::write_sei_nalu(H264_SEI_MESSAGE sei_ assert(false); } - rbsp.set_start_code_prevention(true); - // // Write payload_type to bitstream // @@ -720,4 +720,4 @@ d3d12_video_nalu_writer_h264::write_slice_svc_prefix(const H264_SLICE_PREFIX_SVC std::copy_n(&naluBytes[0], naluByteSize, &headerBitstream.data()[startDstIndex]); writtenBytes = naluByteSize; -} \ No newline at end of file +}