summaryrefslogtreecommitdiff
path: root/drivers/media/usb/em28xx
diff options
context:
space:
mode:
authorFrank Schaefer <fschaefer.oss@googlemail.com>2012-11-25 06:37:32 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-12-22 19:02:32 -0200
commitb77e0c088f07817ecfc4e0a34d4d6a3f99a3ecaf (patch)
tree08efaf09cf19ed28963a4440db6fce2fa1e94f00 /drivers/media/usb/em28xx
parent454fe92f01f8d669669619a9b301d133eda9d173 (diff)
[media] em28xx: fix video data start position calculation in em28xx_urb_data_copy_vbi()
The header check/removal code at the end of function em28xx_urb_data_copy_vbi() is obsolete, because this is already done earlier in this function. In fact it is incomplete (doesn't check for vbi header) and causes trouble when the first data bytes are the same as header bytes (which is fortunately very unlikely). Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/usb/em28xx')
-rw-r--r--drivers/media/usb/em28xx/em28xx-video.c20
1 files changed, 2 insertions, 18 deletions
diff --git a/drivers/media/usb/em28xx/em28xx-video.c b/drivers/media/usb/em28xx/em28xx-video.c
index c7e23dd73b88..fec8847e84d8 100644
--- a/drivers/media/usb/em28xx/em28xx-video.c
+++ b/drivers/media/usb/em28xx/em28xx-video.c
@@ -678,24 +678,8 @@ static inline int em28xx_urb_data_copy_vbi(struct em28xx *dev, struct urb *urb)
dma_q->pos = 0;
}
- if (buf != NULL && dev->capture_type == 2) {
- if (len >= 4 && p[0] == 0x88 && p[1] == 0x88 &&
- p[2] == 0x88 && p[3] == 0x88) {
- p += 4;
- len -= 4;
- }
- if (len >= 4 && p[0] == 0x22 && p[1] == 0x5a) {
- em28xx_isocdbg("Video frame %d, len=%i, %s\n",
- p[2], len, (p[2] & 1) ?
- "odd" : "even");
- p += 4;
- len -= 4;
- }
-
- if (len > 0)
- em28xx_copy_video(dev, dma_q, buf, p, outp,
- len);
- }
+ if (buf != NULL && dev->capture_type == 2 && len > 0)
+ em28xx_copy_video(dev, dma_q, buf, p, outp, len);
}
return rc;
}