Assertion 'index < GST_CAPS_LEN (caps)' failed

I have the following pipeline (my original pipeline has more elements, I removed several of them such as nvinfer and real sinks in order to provide here a minimal reproducible example):

gst-launch-1.0 \
uridecodebin uri="file:///home/ubuntu/testvids/vid1.m4v" ! m.sink_0 \
nvstreammux name = "m" width=1920 height=1080 batch-size=1 ! nvvideoconvert  ! "video/x-raw(memory:NVMM), format=RGBA" ! nvstreamdemux name=d \
d.src_0 ! tee name=t \
t.src_0 ! queue ! nvvideoconvert  ! 'video/x-raw, format=I420' ! fakesink sync=false \
t.src_1 ! queue ! nvdsosd ! fakesink sync=false

The above pipeline produces the following output with both DS 5.0 and 5.1:

Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
Opening in BLOCKING MODE
Opening in BLOCKING MODE 
NvMMLiteOpen : Block : BlockType = 261 
NVMEDIA: Reading vendor.tegra.display-size : status: 6 
NvMMLiteBlockCreate : Block : BlockType = 261 

(gst-launch-1.0:11074): GStreamer-CRITICAL **: 00:13:22.404: gst_caps_get_structure: assertion 'index < GST_CAPS_LEN (caps)' failed

(gst-launch-1.0:11074): GStreamer-CRITICAL **: 00:13:22.404: gst_structure_fixate: assertion 'GST_IS_STRUCTURE (structure)' failed
Caught SIGSEGV
#0  0x0000007f91029e28 in __GI___poll (fds=0x557d632dc0, nfds=547894817672, timeout=<optimized out>) at ../sysdeps/unix/sysv/linux/poll.c:41
#1  0x0000007f91136f58 in  () at /usr/lib/aarch64-linux-gnu/libglib-2.0.so.0
#2  0x000000557ca6ebe0 in  ()

My questions are: why do I get the Critical errors, what’s wrong with it, and how can I fix it?

Thank you in advance!

• Hardware Platform (Jetson / GPU) AGX
• DeepStream Version Both 5.0 and 5.1

What is the format of your “vid1.m4v” file? Seems uridecodebin can not identify it.

I do not think this is the problem, if I remove the t.src_1 branch, there is no error, so uridecodebin seems to work.
Anyway I tried the following 3 videos they all fail:

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/home/ubuntu/testvids/vid1.m4v':
  Metadata:
    major_brand     : M4V 
    minor_version   : 1
    compatible_brands: M4V M4A isommp42
    creation_time   : 2021-05-30T08:42:10.000000Z
  Duration: 00:00:24.77, start: 0.000000, bitrate: 2954 kb/s
    Stream #0:0(eng): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 2560x1920, 2691 kb/s, 6 fps, 6 tbr, 600 tbn, 1200 tbc (default)
    Metadata:
      creation_time   : 2021-05-30T08:42:10.000000Z
      handler_name    : Core Media Video

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/home/ubuntu/testvids/vid2.m4v':
  Metadata:
    major_brand     : mp42
    minor_version   : 512
    compatible_brands: mp42
  Duration: 00:03:49.33, start: 0.000000, bitrate: 1680 kb/s
    Stream #0:0(eng): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 2560x1920, 1677 kb/s, 6 fps, 6 tbr, 600 tbn, 1200 tbc (default)
    Metadata:
      handler_name    : VideoHandler

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/home/ubuntu/testvids/vid3.m4v':
  Metadata:
    major_brand     : mp42
    minor_version   : 512
    compatible_brands: mp42
  Duration: 00:00:42.25, start: 0.000000, bitrate: 5272 kb/s
    Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 2560x1920, 5264 kb/s, 12 fps, 12 tbr, 600 tbn, 1200 tbc (default)
    Metadata:
      handler_name    : VideoHandler