On Tuesday 03 March 2009 18:12:33 kilg...@banach.math.auburn.edu wrote:
> contents of file mr97310a.patch follow, for gspca/mr97310a.c
> --------------------------------------------------------
> --- mr97310a.c.old    2009-02-23 23:59:07.000000000 -0600
> +++ mr97310a.c.new    2009-03-03 17:19:06.000000000 -0600
> @@ -302,21 +302,9 @@ static void sd_pkt_scan(struct gspca_dev
>                                       data, n);
>               sd->header_read = 0;
>               gspca_frame_add(gspca_dev, FIRST_PACKET, frame, NULL, 0);
> -             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;
> +             /* keep the header, including sof marker, for coming frame */
> +             len -= n;
> +             data = sof - sizeof pac_sof_marker;;
>       }
>
>       gspca_frame_add(gspca_dev, INTER_PACKET, frame, data, len);

A few notes:

1.  There is an extra semicolon on that last added line.
2.  sd->header_read no longer seems necessary.
3.  If the SOF marker is split over two transfers then everything falls apart.  
I don't know if the camera will allow that to happen, but it's better to be 
safe.

-Kyle
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to