提交 8394bcf3 编写于 作者: H Hans de Goede 提交者: Mauro Carvalho Chehab

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: NHans de Goede <hdegoede@redhat.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 fb1f9020
...@@ -2248,7 +2248,7 @@ static int i2c_w(struct sd *sd, __u8 reg, __u8 value) ...@@ -2248,7 +2248,7 @@ static int i2c_w(struct sd *sd, __u8 reg, __u8 value)
static int i2c_r(struct sd *sd, __u8 reg) static int i2c_r(struct sd *sd, __u8 reg)
{ {
int ret; int ret = -1;
if (sd->sensor_reg_cache[reg] != -1) if (sd->sensor_reg_cache[reg] != -1)
return sd->sensor_reg_cache[reg]; return sd->sensor_reg_cache[reg];
......
...@@ -580,7 +580,7 @@ static void w9968cf_pkt_scan(struct gspca_dev *gspca_dev, ...@@ -580,7 +580,7 @@ static void w9968cf_pkt_scan(struct gspca_dev *gspca_dev,
/* An empty packet signals EOF */ /* An empty packet signals EOF */
if (gspca_dev->empty_packet) { if (gspca_dev->empty_packet) {
frame = gspca_frame_add(gspca_dev, LAST_PACKET, frame, frame = gspca_frame_add(gspca_dev, LAST_PACKET, frame,
data, len); NULL, 0);
gspca_frame_add(gspca_dev, FIRST_PACKET, frame, gspca_frame_add(gspca_dev, FIRST_PACKET, frame,
NULL, 0); NULL, 0);
gspca_dev->empty_packet = 0; gspca_dev->empty_packet = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册