summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/gspca/gspca.c
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2011-06-05 03:44:43 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-07-27 17:53:39 -0300
commitfa4376d28e19b0835f948c5b42f13738f68bd9a1 (patch)
tree838901752fdbed391b90b5d9aa68b6ae887beac2 /drivers/media/video/gspca/gspca.c
parent21144ea601f1fea37c7add15a099affec7c08425 (diff)
downloadop-kernel-dev-fa4376d28e19b0835f948c5b42f13738f68bd9a1.zip
op-kernel-dev-fa4376d28e19b0835f948c5b42f13738f68bd9a1.tar.gz
[media] gspca: reset image_len to 0 on LAST_PACKET when discarding frame
Reset image and image_len to NULL/0 on LAST_PACKET when we're in discard frame mode, just like we do when not discarding the current frame. The new se401 driver uses image_len for SOF/EOF detection and thus depends on this. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/gspca/gspca.c')
-rw-r--r--drivers/media/video/gspca/gspca.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/media/video/gspca/gspca.c b/drivers/media/video/gspca/gspca.c
index d0b79a9..d94c108 100644
--- a/drivers/media/video/gspca/gspca.c
+++ b/drivers/media/video/gspca/gspca.c
@@ -443,8 +443,11 @@ void gspca_frame_add(struct gspca_dev *gspca_dev,
} else {
switch (gspca_dev->last_packet_type) {
case DISCARD_PACKET:
- if (packet_type == LAST_PACKET)
+ if (packet_type == LAST_PACKET) {
gspca_dev->last_packet_type = packet_type;
+ gspca_dev->image = NULL;
+ gspca_dev->image_len = 0;
+ }
return;
case LAST_PACKET:
return;
OpenPOWER on IntegriCloud