Sample app opencv segmentation fault with nvurisrcbin

PC: RTX 2070 Super
Deepstream: 6.4
Driver Version: 535.154.05
Docker image: deepstream:6.4-gc-triton-devel

I am working on the sample app deepstream-opencv-test in C++ for deepstream 6.4. I can compile and use the app correctly, however if i change to nvurisrcbin plugin, I am getting segmentation fault at the very beginning of the pipeline run.

The only change I have done is shown here

//uri_decode_bin = gst_element_factory_make ("uridecodebin", "uri-decode-bin");
uri_decode_bin = gst_element_factory_make ("nvurisrcbin", "uri-decode-bin");

I am running the application as follows

./deepstream-opencv-test file:///opt/nvidia/deepstream/deepstream/samples/streams/sample_720p.mp4

sorry for the long delay, I will follow up later.

The following patch is required

diff --git a/sources/apps/sample_apps/deepstream-opencv-test/deepstream_opencv_test.c b/sources/apps/sample_apps/deepstream-opencv-test/deepstream_opencv_test.c
index b3e8954..63a06b5 100644
--- a/sources/apps/sample_apps/deepstream-opencv-test/deepstream_opencv_test.c
+++ b/sources/apps/sample_apps/deepstream-opencv-test/deepstream_opencv_test.c
@@ -162,6 +162,9 @@ cb_newpad (GstElement * decodebin, GstPad * decoder_src_pad, gpointer data)
   g_print ("In cb_newpad\n");
   GstCaps *caps = gst_pad_get_current_caps (decoder_src_pad);
+  if (!caps) {
+    caps = gst_pad_query_caps (decoder_src_pad, NULL);
+  }
   const GstStructure *str = gst_caps_get_structure (caps, 0);
   const gchar *name = gst_structure_get_name (str);
   GstElement *source_bin = (GstElement *) data;

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.