Nvv4l2decoder sometimes fails to negotiate with downstream after several pipeline re-launches

Hi,
Here is a python sample for UDP streaming:

#!/usr/bin/env python3

import gi
import time
gi.require_version('Gst', '1.0')
from gi.repository import Gst, GObject, GLib

pipeline = None
bus = None
message = None

# initialize GStreamer
Gst.init(None)

for i in range(1, 5566):
    print("loop =",i," ")
    # build the pipeline
    pipeline = Gst.parse_launch(
        "udpsrc port=5000 ! application/x-rtp,encoding-name=H264,media=video,clock-rate=90000 ! rtph264depay ! h264parse ! nvv4l2decoder ! nvvidconv ! video/x-raw,format=I420 ! fakesink "
    )

    # start playing
    print("Switch to PLAYING state")
    pipeline.set_state(Gst.State.PLAYING)

    time.sleep(8)
    print("Send EoS")
    Gst.Element.send_event(pipeline, Gst.Event.new_eos())
    # wait until EOS or error
    bus = pipeline.get_bus()
    msg = bus.timed_pop_filtered(
        Gst.CLOCK_TIME_NONE, Gst.MessageType.EOS)

    # free resources
    print("Switch to NULL state")
    pipeline.set_state(Gst.State.NULL)
    time.sleep(2)

Please modify the string in Gst.parse_launch() to fit your use-case and run the script to reproduce the failure. If you can run it to reproduce the issue, please share the string so that we can set up and try. Would need your help to provide steps in detail.