[media] vb2: Check if there are buffers before streamon
authorRicardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Wed, 8 Jan 2014 08:01:33 +0000 (05:01 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Tue, 11 Mar 2014 09:56:36 +0000 (06:56 -0300)
commit249f5a58bc844506fef2e9d5d55a88fbc708c5fa
treea645b374920afa3fdeb8fc9a15fbfb9a94433a84
parentc897df0e2dbc81bcc09c11425658d69830825364
[media] vb2: Check if there are buffers before streamon

This patch adds a test preventing streamon() if there is no buffer
ready.

Without this patch, a user could call streamon() before
preparing any buffer. This leads to a situation where if he calls
close() before calling streamoff() the device is kept streaming.

Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
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
This page took 0.025775 seconds and 5 git commands to generate.