V4L/DVB (13180): gspca-w9968cf: Don't add an extra packet to the buffer after the EOF
authorHans de Goede <hdegoede@redhat.com>
Fri, 16 Oct 2009 14:26:22 +0000 (11:26 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sat, 5 Dec 2009 20:40:45 +0000 (18:40 -0200)
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>
drivers/media/video/gspca/ov519.c
drivers/media/video/gspca/w996Xcf.c

index 91e9b23a3a0136bd7ee2ac77cf5ceee61e698073..ef88e244df17ddbcf8a90a31f613a24e40123478 100644 (file)
@@ -2248,7 +2248,7 @@ static int i2c_w(struct sd *sd, __u8 reg, __u8 value)
 
 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];
index ba3a28d4f87fcc2cc915f405979dbdd49b9b862b..3bdc6b405e27253790d81598e167a52a57f33aa2 100644 (file)
@@ -580,7 +580,7 @@ static void w9968cf_pkt_scan(struct gspca_dev *gspca_dev,
        /* 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;