]> git.sesse.net Git - ffmpeg/commit
avcodec/v4l2_m2m: handle v4l2 end of stream event
authorMing Qian <ming.qian@nxp.com>
Wed, 1 Apr 2020 02:38:45 +0000 (10:38 +0800)
committerAndriy Gelman <andriy.gelman@gmail.com>
Wed, 15 Apr 2020 03:42:05 +0000 (23:42 -0400)
commit8ac8e905e934aaae3f3ad3a0e2f2066b55b1c560
tree7db7cdefff36d8b1e1ef30c9492e58fae44e8591
parent0607f1bcb0f6ed04b7bb3a5b3d951fd9b1554561
avcodec/v4l2_m2m: handle v4l2 end of stream event

When flushing the capture buffers, the driver may send a V4L2_EVENT_EOS
to notify that draining is completed. Currently, v4l2_m2m does not
subscribe to this event, which can cause some devices (i.e. imx8qm) to
hang at the end of encoding/decoding. Support for handling the event is
added in this commit.

Some devices may not signal V4L2_EVENT_EOS. This is logged as a warning
message during initialization and not treated as a fatal error.

Signed-off-by: Ming Qian <ming.qian@nxp.com>
Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
libavcodec/v4l2_context.c
libavcodec/v4l2_m2m_dec.c
libavcodec/v4l2_m2m_enc.c