From: Hans de Goede Date: Fri, 16 Oct 2009 14:26:22 +0000 (-0300) Subject: V4L/DVB (13180): gspca-w9968cf: Don't add an extra packet to the buffer after the EOF X-Git-Tag: firefly_0821_release~9833^2~3918^2~241 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=8394bcf3fc0293aa5cd07e2a1a3c6bf4e1a5b835;p=firefly-linux-kernel-4.4.55.git V4L/DVB (13180): gspca-w9968cf: Don't add an extra packet to the buffer after the EOF 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 Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/video/gspca/ov519.c b/drivers/media/video/gspca/ov519.c index 91e9b23a3a01..ef88e244df17 100644 --- a/drivers/media/video/gspca/ov519.c +++ b/drivers/media/video/gspca/ov519.c @@ -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]; diff --git a/drivers/media/video/gspca/w996Xcf.c b/drivers/media/video/gspca/w996Xcf.c index ba3a28d4f87f..3bdc6b405e27 100644 --- a/drivers/media/video/gspca/w996Xcf.c +++ b/drivers/media/video/gspca/w996Xcf.c @@ -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;