gspca-w9968cf: Don't add an extra packet to the buffer after the EOF,
this makes the frame data size bigger then it should be which makes
gstreamer discard it.
This patch also fixes an unrelated compiler warning.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
static int i2c_r(struct sd *sd, __u8 reg)
{
- int ret;
+ int ret = -1;
if (sd->sensor_reg_cache[reg] != -1)
return sd->sensor_reg_cache[reg];
/* An empty packet signals EOF */
if (gspca_dev->empty_packet) {
frame = gspca_frame_add(gspca_dev, LAST_PACKET, frame,
- data, len);
+ NULL, 0);
gspca_frame_add(gspca_dev, FIRST_PACKET, frame,
NULL, 0);
gspca_dev->empty_packet = 0;