ERROR from src_bin_muxer: Output width not set

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU)
GPU
• DeepStream Version
5.0
• JetPack Version (valid for Jetson only)
• TensorRT Version
7.0
• NVIDIA GPU Driver Version (valid for GPU only)
440
• Issue Type( questions, new requirements, bugs)
question

I have already read the posted issue with this similar topic, and found no help.
I followed this GitHub - NVIDIA-AI-IOT/deepstream-occupancy-analytics: This is a sample application for counting people entering/leaving in a building using NVIDIA Deepstream SDK, Transfer Learning Toolkit (TLT), and pre-trained models. This application can be used to build real-time occupancy analytics applications for smart buildings, hospitals, retail, etc. The application is based on deepstream-test5 sample application., and try to convert Makefile to CMakelist, everything worked quite well.
Then I followed this repo: GitHub - DanaHan/Yolov5-in-Deepstream-5.0: Describe how to use yolov5 in Deepstream 5.0
it also worked with deepstream-app command. But it failed when I used CMakelist.

ERROINFO:
** ERROR: main:655: Failed to set pipeline to PAUSED
Quitting
ERROR from src_bin_muxer: Output width not set
Debug info: gstnvstreammux.c(2283): gst_nvstreammux_change_state (): /GstPipeline:pipeline/GstBin:multi_src_bin/GstNvStreamMux:src_bin_muxer
App run failed

What possibilities could cause this error?

This error happens when the pipeline is wrong. E.g. the nvstreammux is not connected with src or sink, the properties of the plugins is set to wrong value, …

solved by fix custom plugin