Deepstream CSI Camera input pipeline in c

I am trying to modify the deepstream-test1-webcam_in example to use CSI camera instead of USB.
I have changed the camera source from v4l2src to nvarguscamerasrc as follows:

source = gst_element_factory_make (“nvarguscamerasrc”, “camera-source”);
g_object_set (G_OBJECT (source), “sensor-id”, 0, NULL);

The rest of the pipeline is the same.
The resulting message:

/home/dlinano/deepstream_sdk_v4.0.2_jetson/sources/apps/dli_apps/deepstream-test1-webcam_in

*** DeepStream: Launched RTSP Streaming at rtsp://localhost:8554/ds-test ***

Now playing: (null)
Opening in BLOCKING MODE
Creating LL OSD context new
Running…
Creating LL OSD context new
NvMMLiteOpen : Block : BlockType = 4
===== NVMEDIA: NVENC =====
NvMMLiteBlockCreate : Block : BlockType = 4
GST_ARGUS: Creating output stream
CONSUMER: Waiting until producer is connected…
GST_ARGUS: Available Sensor modes :
GST_ARGUS: 3264 x 2464 FR = 21.000000 fps Duration = 47619048 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 3264 x 1848 FR = 28.000001 fps Duration = 35714284 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 1920 x 1080 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 1280 x 720 FR = 59.999999 fps Duration = 16666667 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 1280 x 720 FR = 120.000005 fps Duration = 8333333 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: Running with following settings:
Camera index = 0
Camera mode = 4
Output Stream W = 1280 H = 720
seconds to Run = 0
Frame Rate = 120.000005
GST_ARGUS: PowerService: requested_clock_Hz=6048000
GST_ARGUS: Setup Complete, Starting captures for 0 seconds
GST_ARGUS: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.
ERROR from element stream-muxer: Input buffer number of surfaces (0) must be equal to mux->num_surfaces_per_frame (1)
Set nvstreammux property num-surfaces-per-frame appropriately

Error details: /dvs/git/dirty/git-master_linux/deepstream/sdk/src/gst-plugins/gst-nvmultistream/gstnvstreammux.c(309): gst_nvstreammux_chain (): /GstPipeline:dstest1-pipeline/GstNvStreamMux:stream-muxer
Returned, stopping playback
GST_ARGUS: Cleaning up
CONSUMER: Done Success
GST_ARGUS: Done Success
Deleting pipeline
GST_ARGUS:
PowerServiceHwVic::cleanupResources

Whats am I missing?