DeepStream fails with Input buffer number of surfaces (0) must be equal to mux->num_surfaces_per_frame (1)

I am getting this error when trying to run this simple deepstream string:

gst-launch-1.0 nvv4l2camerasrc bufapi-version=0 device=/dev/video0 ! 'video/x-raw(memory:NVMM),width=(int)1920,height=(int)1080,framerate=(fraction)60/1,format=(string)UYVY' ! nvvid
conv ! 'video/x-raw(memory:NVMM), format=(string)NV12' ! m.sink_0 nvstreammux name=m batch-size=1 width=1920 height=1080 !nvinfer config-file-path="/home/user/NVIDIA-Jetson/DeepStream 5.0/YOLOv4/DeepStream/config_
infer_primary_yoloV4_tiny.txt"

Error:

Setting pipeline to PAUSED ...
0:00:02.586055670 31581   0x558d6c4610 INFO                 nvinfer gstnvinfer.cpp:619:gst_nvinfer_logger:<nvinfer0> NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::deserializeEngineAndBackend() <nvdsinfer_context_impl.cpp:1702> [UID = 1]: deserialized trt engine from :/home/user/pytorch-YOLOv4/yolov4_1_3_416_416_fp16.engine
INFO: [Implicit Engine Info]: layers num: 3
0   INPUT  kFLOAT input           3x416x416
1   OUTPUT kFLOAT boxes           2535x1x4
2   OUTPUT kFLOAT confs           2535x4

0:00:02.586260247 31581   0x558d6c4610 INFO                 nvinfer gstnvinfer.cpp:619:gst_nvinfer_logger:<nvinfer0> NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::generateBackendContext() <nvdsinfer_context_impl.cpp:1806> [UID = 1]: Use deserialized engine model: /home/user/pytorch-YOLOv4/yolov4_1_3_416_416_fp16.engine
0:00:02.592233633 31581   0x558d6c4610 INFO                 nvinfer gstnvinfer_impl.cpp:313:notifyLoadModelStatus:<nvinfer0> [UID 1]: Load new model:/home/user/NVIDIA-Jetson/DeepStream 5.0/YOLOv4/DeepStream/config_infer_primary_yoloV4_tiny.txt sucessfully
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
ERROR: from element /GstPipeline:pipeline0/GstNvStreamMux:m: 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(364): gst_nvstreammux_chain (): /GstPipeline:pipeline0/GstNvStreamMux:m
Execution ended after 0:00:00.039570937
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...

• Xavier NX
• DeepStream Version 5.1
• JetPack Version 4.5.1

Please refer to DeepStream SDK FAQ - Intelligent Video Analytics / DeepStream SDK - NVIDIA Developer Forums