Premature end of JPEG file

hi all,now i test the nano jetson_multimedia_api 06_jpeg_decode demo,and found that some jpeg files decode will have that following print log,but it is not affect the decode result , but if my program print the following logs Continuously,that is not convenient for debuging , i found that print log may be the libjpeg lib print,so how can i fix that problem?

Premature end of JPEG file

Hi,
Please refer to the code in 12_camera_v4l2_cuda:

                /* v4l2_buf.bytesused may have padding bytes for alignment
                   Search for EOF to get exact size */
                if (eos_search_size > bytesused)
                    eos_search_size = bytesused;
                for (i = 0; i < eos_search_size; i++) {
                    p =(uint8_t *)(ctx->g_buff[v4l2_buf.index].start + bytesused);
                    if ((*(p-2) == 0xff) && (*(p-1) == 0xd9)) {
                        break;
                    }
                    bytesused--;
                }