jpegTegraEncoderCompress Segmentation fault

I am working with Jetson NX and Jetpack version 4.3,deepstream 5.0, tensor 7.1.3-1+cuda10.2. I use the plugin nvjpegenv to encode the image base the deepstream-test3, but I get the segmentation fault,

the debug infor as:
In cb_newpad
[Thread 0x7f48ff9170 (LWP 8855) exited]
[New Thread 0x7f48ff9170 (LWP 8886)]
Decodebin child added: avdec_aac0
[New Thread 0x7ec4c50170 (LWP 8887)]
In cb_newpad
Frame Number = 0 Number of objects = 1 Vehicle Count = 0 Person Count = 1
Frame Number = 0 Number of objects = 1 Vehicle Count = 0 Person Count = 1
[New Thread 0x7ebde46170 (LWP 8888)]

Thread 6 “deepstream-test” received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7f809b6170 (LWP 8845)]
0x0000007fa2e6033c in jpegTegraEncoderCompress ()
from /usr/lib/aarch64-linux-gnu/tegra/libnvjpeg.so
(gdb) bt
#0 0x0000007fa2e6033c in jpegTegraEncoderCompress () at /usr/lib/aarch64-linux-gnu/tegra/libnvjpeg.so
#1 0x0000007fa2e2a354 in jpeg_write_raw_data () at /usr/lib/aarch64-linux-gnu/tegra/libnvjpeg.so
#2 0x0000007faf818b08 in () at /usr/lib/aarch64-linux-gnu/gstreamer-1.0/libgstnvjpeg.so
#3 0x0000007fb6d84774 in () at /usr/lib/aarch64-linux-gnu/libgstvideo-1.0.so.0
#4 0x0000005555a5e1f0 in ()

Attached is my souce code.deepstream_test3_app.c (20.3 KB)
Look forward to your reply. Thank you!

Hi,
Please refer to

You would need to link the elements like:

... ! nvvideoconvert ! video/x-raw,format=I420 ! nvjpegenc ! ...
1 Like

Thank you for replay , the plugin nvjpegenc is woking now .