NvOSD Error

I tried to draw fixed rectangles, but some error occurs.
But the output stream(H.265/ES) is drawn the rectangles.
My fixed rectangles are as follows.

const int g_rect_num = 2;
NvOSD_RectParams g_rect[2];
g_rect[0].left = 480 - 60;
g_rect[0].top = 270 - 135;
g_rect[0].width = 120;
g_rect[0].height= 270;
g_rect[0].border_width = 5;
g_rect[0].border_color.red = 1.0;
g_rect[0].border_color.blue = 0.0;
g_rect[0].border_color.green = 0.0;
g_rect[0].border_color.alpha = 0.0;
g_rect[0].has_bg_color= 0;
g_rect[0].has_color_info= 1;
//drawing
nvosd_draw_rectangles(m_nvosd_context,
                          MODE_HW,
                          dmabuf_fd,
                          g_rect_num,
                          g_rect);

And error message is

NvOsd ERR----line = 1260 -2

Where should I modify ?

Hi,
You fill in g_rect[0] in the code. Probably miss to fill in g_rect[1]. Please add the code for a try.

I changed g_rect_num to 1 as your attention.
I solved the error. Thank you.