v4l2videodec : setup capture after output queue is started
In specification, the Initialization flow is:
3.Start streaming on the OUTPUT queue via VIDIOC_STREAMON().
4.This step only applies to coded formats that contain
resolution information in the stream. Continue
queuing/dequeuing bytestream buffers to/from the OUTPUT queue
via VIDIOC_QBUF() and VIDIOC_DQBUF(). The buffers will be
processed and returned to the client in order, until required
metadata to configure the CAPTURE queue are found. This is
indicated by the decoder sending a V4L2_EVENT_SOURCE_CHANGE
event with changes set to V4L2_EVENT_SRC_CH_RESOLUTION.
[snip]
A client capable of acquiring stream parameters from the
bytestream on its own may attempt to set the width and height of
the OUTPUT format to non-zero values matching the coded size of
the stream, skip this step and continue with the Capture Setup
sequence.
[snip]
5.Continue with the Capture Setup sequence.
In gstreamer's implement, the step 4 is skipped, but in !1960 (merged), I made a mistake that setup capture before start the output queue. It violates the specification.
So setup the capture queue after the output is started, but before enqueue any output buffers
Signed-off-by: Ming Qian ming.qian@nxp.com