It appears to me now there is a bug in the v4l2loopback that its timer calculation may corrupt under a certain scenario that `v4l2-compliance` gives:
$ v4l2-compliance -d /dev/video1
...
Buffer ioctls (Output 0): fail: v4l2-test-buffers.cpp(369): timestamp != V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC && timestamp != V4L2_BUF_FLAG_TIMESTAMP_COPY fail: v4l2-test-buffers.cpp(486): buf.check(Unqueued, i) fail: v4l2-test-buffers.cpp(615): testQueryBuf(node, i, q.g_buffers())
test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: FAIL
test VIDIOC_EXPBUF: OK (Not Supported) fail: v4l2-test-buffers.cpp(1803): media_fd < 0
test Requests: FAIL
Then a simple v4l2sink test will fail with log:
$ GST_DEBUG=v4l2sink:7 gst-launch-1.0 -v videotestsrc ! v4l2sink device=/dev/video1
...
0:00:00.025135153 2684382 0x55949d5f01e0 DEBUG v4l2sink
gstv4l2sink.c:592:gst_v4l2sink_show_frame:<v4l2sink0> render buffer: 0x55949d6067e0
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
0:00:00.025482054 2684382 0x55949d5f8240 DEBUG v4l2sink
gstv4l2sink.c:444:gst_v4l2sink_change_state:<v4l2sink0> 3 -> 4
Redistribute latency...
New clock: GstSystemClock
0:00:00.025629911 2684382 0x55949d5f01e0 DEBUG v4l2sink
gstv4l2sink.c:592:gst_v4l2sink_show_frame:<v4l2sink0> render buffer: 0x55949d6067e0
Caught SIGSEGV
Spinning. Please run 'gdb gst-launch-1.0 2684382' to continue debugging, Ctrl-C to quit, or
Ctrl-\ to dump core.
^C
This can be easily reproduced with multiple `v4l2-compliance -d /dev/video1` executions until that timestamp test failure appears, then the following gst-launch-1.0 attempts will all fail.
It appears to me now there is a bug in the v4l2loopback that its timer calculation may corrupt under a certain scenario that `v4l2-compliance` gives:
$ v4l2-compliance -d /dev/video1
fail: v4l2-test- buffers. cpp(369) : timestamp != V4L2_BUF_ FLAG_TIMESTAMP_ MONOTONIC && timestamp != V4L2_BUF_ FLAG_TIMESTAMP_ COPY
fail: v4l2-test- buffers. cpp(486) : buf.check(Unqueued, i)
fail: v4l2-test- buffers. cpp(615) : testQueryBuf(node, i, q.g_buffers()) REQBUFS/ CREATE_ BUFS/QUERYBUF: FAIL
fail: v4l2-test- buffers. cpp(1803) : media_fd < 0
...
Buffer ioctls (Output 0):
test VIDIOC_
test VIDIOC_EXPBUF: OK (Not Supported)
test Requests: FAIL
Then a simple v4l2sink test will fail with log:
$ GST_DEBUG= v4l2sink: 7 gst-launch-1.0 -v videotestsrc ! v4l2sink device=/dev/video1 c:592:gst_ v4l2sink_ show_frame: <v4l2sink0> render buffer: 0x55949d6067e0 c:444:gst_ v4l2sink_ change_ state:< v4l2sink0> 3 -> 4 c:592:gst_ v4l2sink_ show_frame: <v4l2sink0> render buffer: 0x55949d6067e0
...
0:00:00.025135153 2684382 0x55949d5f01e0 DEBUG v4l2sink
gstv4l2sink.
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
0:00:00.025482054 2684382 0x55949d5f8240 DEBUG v4l2sink
gstv4l2sink.
Redistribute latency...
New clock: GstSystemClock
0:00:00.025629911 2684382 0x55949d5f01e0 DEBUG v4l2sink
gstv4l2sink.
Caught SIGSEGV
Spinning. Please run 'gdb gst-launch-1.0 2684382' to continue debugging, Ctrl-C to quit, or
Ctrl-\ to dump core.
^C
This can be easily reproduced with multiple `v4l2-compliance -d /dev/video1` executions until that timestamp test failure appears, then the following gst-launch-1.0 attempts will all fail.