Deepstream: Input buffer number of surfaces (0) must be equal to mux->num_surfaces_per_frame (1)

I have deepstream 5.0.1 and ar0512 camera sensor

I have this pipeline,

gst-launch-1.0 v4l2src device=/dev/video0
! “video/x-raw, format=(string)UYVY, width=(int)2592, height=(int)1944”
! nvvidconv
! “video/x-raw(memory:NVMM), format=(string)NV12, width=(int)1920,height=(int)1080”
! nvmux.sink_0 nvstreammux name=nvmux width=1920 height=1080 batch-size=1 live-source=1
! nvinfer config-file-path=/opt/nvidia/deepstream/deepstream/samples/configs/deepstream-app/config_infer_primary_nano.txt
! nvtracker ll-lib-file =/opt/nvidia/deepstream/deepstream/lib/libnvds_nvdcf.so
ll-config-file=/opt/nvidia/deepstream/deepstream/samples/configs/deepstream-app/tracker_config.yml
tracker-width=640 tracker-height=384
! nvdsanalytics config-file=/opt/nvidia/deepstream/deepstream/sources/apps/sample_apps/deepstream-nvdsanalytics-test/config_nvdsanalytics.txt
! nvmultistreamtiler ! nvvideoconvert ! nvdsosd ! nvegltransform ! nveglglessink

This is the log:

Setting pipeline to PAUSED …

Using winsys: x11
gstnvtracker: Loading low-level lib at /opt/nvidia/deepstream/deepstream/lib/libnvds_nvdcf.so
gstnvtracker: Batch processing is ON
gstnvtracker: Past frame output is OFF
[NvDCF] Initialized
ERROR: Deserialize engine failed because file path: /opt/nvidia/deepstream/deepstream-5.0/samples/configs/deepstream-app/…/…/models/Primary_Detector_Nano/resnet10.caffemodel_b8_gpu0_fp16.engine open error
0:00:03.476383025 13454 0x556f7580d0 WARN nvinfer gstnvinfer.cpp:616:gst_nvinfer_logger: NvDsInferContext[UID 1]: Warning from NvDsInferContextImpl::deserializeEngineAndBackend() <nvdsinfer_context_impl.cpp:1690> [UID = 1]: deserialize engine from file :/opt/nvidia/deepstream/deepstream-5.0/samples/configs/deepstream-app/…/…/models/Primary_Detector_Nano/resnet10.caffemodel_b8_gpu0_fp16.engine failed
0:00:03.476462562 13454 0x556f7580d0 WARN nvinfer gstnvinfer.cpp:616:gst_nvinfer_logger: NvDsInferContext[UID 1]: Warning from NvDsInferContextImpl::generateBackendContext() <nvdsinfer_context_impl.cpp:1797> [UID = 1]: deserialize backend context from engine from file :/opt/nvidia/deepstream/deepstream-5.0/samples/configs/deepstream-app/…/…/models/Primary_Detector_Nano/resnet10.caffemodel_b8_gpu0_fp16.engine failed, try rebuild
0:00:03.476497929 13454 0x556f7580d0 INFO nvinfer gstnvinfer.cpp:619:gst_nvinfer_logger: NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::buildModel() <nvdsinfer_context_impl.cpp:1715> [UID = 1]: Trying to create engine from model files
INFO: [TRT]: Some tactics do not have sufficient workspace memory to run. Increasing workspace size may increase performance, please check verbose output.
INFO: [TRT]: Detected 1 inputs and 2 output network tensors.
ERROR: Serialize engine failed because of file path: /opt/nvidia/deepstream/deepstream-5.0/samples/models/Primary_Detector_Nano/resnet10.caffemodel_b8_gpu0_fp16.engine opened error
0:00:43.290318251 13454 0x556f7580d0 WARN nvinfer gstnvinfer.cpp:616:gst_nvinfer_logger: NvDsInferContext[UID 1]: Warning from NvDsInferContextImpl::buildModel() <nvdsinfer_context_impl.cpp:1743> [UID = 1]: failed to serialize cude engine to file: /opt/nvidia/deepstream/deepstream-5.0/samples/models/Primary_Detector_Nano/resnet10.caffemodel_b8_gpu0_fp16.engine
INFO: [Implicit Engine Info]: layers num: 3
0 INPUT kFLOAT input_1 3x272x480
1 OUTPUT kFLOAT conv2d_bbox 16x17x30
2 OUTPUT kFLOAT conv2d_cov/Sigmoid 4x17x30

0:00:43.344710687 13454 0x556f7580d0 INFO nvinfer gstnvinfer_impl.cpp:313:notifyLoadModelStatus: [UID 1]: Load new model:/opt/nvidia/deepstream/deepstream/samples/configs/deepstream-app/config_infer_primary_nano.txt sucessfully
Pipeline is live and does not need PREROLL …
Got context from element ‘eglglessink0’: gst.egl.EGLDisplay=context, display=(GstEGLDisplay)NULL;
Setting pipeline to PLAYING …
New clock: GstSystemClock
ERROR: from element /GstPipeline:pipeline0/GstNvStreamMux:nvmux: Input buffer number of surfaces (0) must be equal to mux → num_surfaces_per_frame (1)
Set nvstreammux property num-surfaces-per-frame appropriately

Additional debug info:
/dvs/git/dirty/git-master_linux/deepstream/sdk/src/gst-plugins/gst-nvmultistream/gstnvstreammux.c(354): gst_nvstreammux_chain (): /GstPipeline:pipeline0/GstNvStreamMux:nvmux
Execution ended after 0:00:00.622354480
Setting pipeline to PAUSED …
Setting pipeline to READY …
[NvDCF] De-initialized
Setting pipeline to NULL …
Freeing pipeline …

Any ideas ?