upstream: [media] vb2: fix streamoff handling if streamon wasn't called
authorHans Verkuil <hans.verkuil@cisco.com>
Tue, 25 Feb 2014 12:42:45 +0000 (09:42 -0300)
committerChanho Park <chanho61.park@samsung.com>
Tue, 18 Nov 2014 02:54:55 +0000 (11:54 +0900)
commit292819ef3591b6f1e219bba2d3f0a6bf302cc654
treec441d772d3a18bbe18ce5efadc1841bf5b1cf537
parentbc52d59aa16261c79d668dc1c2d00638663a1e1b
upstream: [media] vb2: fix streamoff handling if streamon wasn't called

If you request buffers, then queue buffers and then call STREAMOFF
those buffers are not returned to their dequeued state because streamoff
will just return if q->streaming was 0.

This means that afterwards you can never QBUF that same buffer again unless
you do STREAMON, REQBUFS or close the filehandle first.

It is clear that if you do STREAMOFF even if no STREAMON was called before,
you still want to have all buffers returned to their proper dequeued state.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/v4l2-core/videobuf2-core.c