A problem about NvOSD_LineParams

Hello everyone

I want draw a region in deepstream.
My code like:

static GstPadProbeReturn
osd_sink_pad_buffer_probe(GstPad * pad, GstPadProbeInfo * info,
gpointer u_data)
{
    GstBuffer *buf = (GstBuffer *)info->data;
    guint num_rects = 0;
   NvDsObjectMeta *obj_meta = NULL;
guint vehicle_count = 0;
guint person_count = 0;
NvDsMetaList * l_frame = NULL;
NvDsMetaList * l_obj = NULL;
NvDsDisplayMeta *display_meta = NULL;
NvDsBatchMeta *batch_meta = gst_buffer_get_nvds_batch_meta(buf);
for (l_frame = batch_meta->frame_meta_list; l_frame != NULL;
	l_frame = l_frame->next) {
	NvDsFrameMeta *frame_meta = (NvDsFrameMeta *)(l_frame->data);
	int offset = 0;
	for (l_obj = frame_meta->obj_meta_list; l_obj != NULL;
		l_obj = l_obj->next) {
		obj_meta = (NvDsObjectMeta *)(l_obj->data);
		if (obj_meta->class_id == PGIE_CLASS_ID_VEHICLE) {
			vehicle_count++;
			num_rects++;
		}
		if (obj_meta->class_id == PGIE_CLASS_ID_PERSON) {
			person_count++;
			num_rects++;
		}
	}
	display_meta = nvds_acquire_display_meta_from_pool(batch_meta);
	NvOSD_LineParams  *lines_params = &display_meta->line_params[0];
	display_meta->num_labels = 1;
	lines_params->x1 = 0;
	lines_params->y1 = 100;
	lines_params->x2 = 100;
	lines_params->y2 = 100;
	lines_params->line_width = 4;
	lines_params->line_color = (NvOSD_ColorParams) { 1.0, 0.0, 0.0, 1.0 };
	display_meta->num_lines=1;
	nvds_add_display_meta_to_frame(frame_meta, display_meta);
}
return GST_PAD_PROBE_OK;
}

It is a probe function before osd.

gst_pad_add_probe (osd_sink_pad, GST_PAD_PROBE_TYPE_BUFFER,
    osd_sink_pad_buffer_probe, NULL, NULL);

It can draw a line,But the line is damaged and is incomplete.

There is no update from you for a period, assuming this is not an issue any more.
Hence we are closing this topic. If need further support, please open a new one.
Thanks

what’s the resolution of your original frame, can you show me the result?