|
@@ -1653,7 +1653,7 @@ static int vidioc_streamoff(struct file *file, void *priv,
|
|
|
enum v4l2_buf_type buf_type)
|
|
|
{
|
|
|
struct gspca_dev *gspca_dev = video_drvdata(file);
|
|
|
- int ret;
|
|
|
+ int i, ret;
|
|
|
|
|
|
if (buf_type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
|
|
|
return -EINVAL;
|
|
@@ -1678,6 +1678,8 @@ static int vidioc_streamoff(struct file *file, void *priv,
|
|
|
wake_up_interruptible(&gspca_dev->wq);
|
|
|
|
|
|
/* empty the transfer queues */
|
|
|
+ for (i = 0; i < gspca_dev->nframes; i++)
|
|
|
+ gspca_dev->frame[i].v4l2_buf.flags &= ~BUF_ALL_FLAGS;
|
|
|
atomic_set(&gspca_dev->fr_q, 0);
|
|
|
atomic_set(&gspca_dev->fr_i, 0);
|
|
|
gspca_dev->fr_o = 0;
|