Artifacts on images and error when using nvv4l2decoder

In one of our Deepstream based pipelines, we encountered artifacts in the output images when running on Jetson NX. The problem seems to be in nvv4l2decoder. In the attached archive are the input images and the output images. A input folder - with input images. A result folder - folder with images after executing the command below. images.zip (2.4 MB)

• Hardware Platform: Jetson
• DeepStream Version: 6.2
• JetPack Version (valid for Jetson only): R35 REVISION: 1.0
• TensorRT Version: 8.4.1.5-1+cuda11.4
• Issue Type: bugs
• How to reproduce the issue ? (This is for bugs. Including which sample app is using, the configuration files content, the command line used and other details for reproducing)

Run docker
docker run -it --rm -v pwd:/data nvcr.io/nvidia/deepstream-l4t:6.2-triton

In docker
gst-launch-1.0 multifilesrc location=/data/input/foto%d.jpg ! jpegparse ! nvv4l2decoder mjpeg=1 ! nvvideoconvert ! jpegenc ! multifilesink location=/data/result/foto_%06d.jpg

After this command we get images with artifacts and there is such an error.:

nvbufsurface: NvBufSurfaceCopy: mem copy failed
nvbufsurface: NvBufSurfaceCopy: failed to copy

mjpeg=1 is set according to FAQ

If we remove this option, we get this error and pipeline freezes

[JPEG Decode] NvMMLiteJPEGDecBlockClose done
NvJpeg_Tvmr_Error: tvmrNvjpgJPEGDecoderRenderYUV: 1688: Surface resolution is small
[JPEG Decode] failed to decode JPEG (0)
NvJpeg_Tvmr_Error: tvmrNvjpgJPEGDecoderRenderYUV: 1688: Surface resolution is small
[JPEG Decode] failed to decode JPEG (0)
NvJpeg_Tvmr_Error: tvmrNvjpgJPEGDecoderRenderYUV: 1688: Surface resolution is small
[JPEG Decode] failed to decode JPEG (0)
NvJpeg_Tvmr_Error: tvmrNvjpgJPEGDecoderRenderYUV: 1688: Surface resolution is small

I can reproduce the problem on my Jetson board. We will look into this issue and be back when there is any progress.