gstreamer pipeline: Video device did not suggest any buffer size (nvv4l2decoder)

Jetpack 4.2.1, 32.2.1
I have a gstreamer pipeline that randomly fails with the same failure, seemingly caused by the nvv4l2decoder element. The gstreamer pipeline is using python bindings, with multiple pipelines running in series (not parallel). The structure is as follows:

step1: create mpeg2 TS file
udpsrc → filesink (no decoder in this pipeline, removed parsers/etc for visual simplicity)
pipeline is then set to Gst.State.NULL and then unref().

step2: transcode mpeg2 TS file to h264
filesrc → demuxer → nvv4l2decoder → nvv4l2h264enc → filesink
pipeline is then set to Gst.State.NULL and then unref().

step3: output 4 fps jpeg frame files
filesrc → demuxer → nvv4l2decoder → nvjpegenc → multifilesink

Each step is called from the same runner.py file. The runner.py file is called from different shells.

Error message:
gst-resource-error-quark: Video device did not suggest any buffer size. (13) /dvs/git/dirty/git-master_linux/3rdparty/gst/gst-v4l2/gst-v4l2/gstv4l2object.c(4774): gst_v4l2_object_decide_allocation (): /GstPipeline:pipeline3/nvv4l2decoder:decoder

It seems that no matter what I do, the nvv4l2decoder doesn’t properly release its resources/buffers when it is EOS and unreffed. Is there some kind of patch or command I can call to properly destroy and recreate the decoder between pipelines called from the same parent python file?

Hi,
Please share the script so that we can reproduce the error. Also you may try omxh264dec and omxh264enc plugins.

Hi drewqm96r,

Is this still an issue to support? Please help to update the status then we can help.

Hi Dane/Kay,
Sorry for the delay. I am having trouble reproducing the issue consistently, will send over code asap.