[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)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Tue, 11 Mar 2014 09:56:43 +0000 (06:56 -0300)
commit3f1a9a33a58eebcc5799d9a6b797e9e19cf8627f
treed3e1e5706880abb7a71e69c892d01c3b4bec7140
parente4d2581649fe87bbd506c4d55591c4de9d2962d8
[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