Comment 19 for bug 1978757

Revision history for this message
You-Sheng Yang (vicamo) wrote : Re: Can't playback preview on Intel IPU6 camera platform

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.