aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTheodore Kilgore <kilgota@auburn.edu>2009-03-13 13:04:31 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-03-30 12:43:20 -0300
commit9832d765f82769799ba15ac9d2e8edf8f7de6898 (patch)
treed4b63f69efe28d996ddcea2f78ce15d1a8903743
parent9f9cd8f18c7faabf6dc144c198f6ee30429d3da0 (diff)
downloadkernel_samsung_smdk4412-9832d765f82769799ba15ac9d2e8edf8f7de6898.zip
kernel_samsung_smdk4412-9832d765f82769799ba15ac9d2e8edf8f7de6898.tar.gz
kernel_samsung_smdk4412-9832d765f82769799ba15ac9d2e8edf8f7de6898.tar.bz2
V4L/DVB (10986): mr97310a: don't discard frame headers on stream output
Fix a bug where all frame headers were being discarded, instead of being part of the stream output, on MR97310A cameras. The frame headers contain information which may be useful in processing the video output and therefore should be kept and not discarded. A corresponding patch to the decompression algorithm in libv4lconvert/mr97310a.c corrects the change in frame offset. Signed-off-by: Theodore Kilgore <kilgota@auburn.edu> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--drivers/media/video/gspca/mr97310a.c22
1 files changed, 3 insertions, 19 deletions
diff --git a/drivers/media/video/gspca/mr97310a.c b/drivers/media/video/gspca/mr97310a.c
index 5ec5ce6..2a901a4 100644
--- a/drivers/media/video/gspca/mr97310a.c
+++ b/drivers/media/video/gspca/mr97310a.c
@@ -29,9 +29,7 @@ MODULE_LICENSE("GPL");
/* specific webcam descriptor */
struct sd {
struct gspca_dev gspca_dev; /* !! must be the first item */
-
u8 sof_read;
- u8 header_read;
};
/* V4L2 controls supported by the driver */
@@ -285,7 +283,6 @@ static void sd_pkt_scan(struct gspca_dev *gspca_dev,
__u8 *data, /* isoc packet */
int len) /* iso packet length */
{
- struct sd *sd = (struct sd *) gspca_dev;
unsigned char *sof;
sof = pac_find_sof(gspca_dev, data, len);
@@ -300,25 +297,12 @@ static void sd_pkt_scan(struct gspca_dev *gspca_dev,
n = 0;
frame = gspca_frame_add(gspca_dev, LAST_PACKET, frame,
data, n);
- sd->header_read = 0;
- gspca_frame_add(gspca_dev, FIRST_PACKET, frame, NULL, 0);
+ /* Start next frame. */
+ gspca_frame_add(gspca_dev, FIRST_PACKET, frame,
+ pac_sof_marker, sizeof pac_sof_marker);
len -= sof - data;
data = sof;
}
- if (sd->header_read < 7) {
- int needed;
-
- /* skip the rest of the header */
- needed = 7 - sd->header_read;
- if (len <= needed) {
- sd->header_read += len;
- return;
- }
- data += needed;
- len -= needed;
- sd->header_read = 7;
- }
-
gspca_frame_add(gspca_dev, INTER_PACKET, frame, data, len);
}