summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/video-buf.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux/drivers/media/video/video-buf.c')
-rw-r--r--linux/drivers/media/video/video-buf.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/linux/drivers/media/video/video-buf.c b/linux/drivers/media/video/video-buf.c
index 49b1d8d1c..b3d64a6aa 100644
--- a/linux/drivers/media/video/video-buf.c
+++ b/linux/drivers/media/video/video-buf.c
@@ -629,6 +629,8 @@ videobuf_qbuf(struct file *file, struct videobuf_queue *q,
case V4L2_MEMORY_USERPTR:
if (b->length < buf->bsize)
goto done;
+ if (STATE_NEEDS_INIT != buf->state && buf->baddr != b->m.userptr)
+ q->ops->buf_release(file,buf);
buf->baddr = b->m.userptr;
break;
case V4L2_MEMORY_OVERLAY: