This is an automatic generated email to let you know that the following patch 
were queued at the 
http://git.linuxtv.org/v4l-dvb.git tree:

Subject: V4L/DVB: gspca - t613: Simplify the scan of isoc packets
Author:  Jean-François Moine <[email protected]>
Date:    Sat Jun 5 06:56:48 2010 -0300

Signed-off-by: Jean-François Moine <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>

 drivers/media/video/gspca/t613.c |   25 ++++++++-----------------
 1 files changed, 8 insertions(+), 17 deletions(-)

---

http://git.linuxtv.org/v4l-dvb.git?a=commitdiff;h=110da0bca2ae123bc2763f8e685708ac4efc9fdb

diff --git a/drivers/media/video/gspca/t613.c b/drivers/media/video/gspca/t613.c
index 8f09d5c..d6f18e8 100644
--- a/drivers/media/video/gspca/t613.c
+++ b/drivers/media/video/gspca/t613.c
@@ -1066,7 +1066,7 @@ static void sd_pkt_scan(struct gspca_dev *gspca_dev,
                        u8 *data,                       /* isoc packet */
                        int len)                        /* iso packet length */
 {
-       static u8 ffd9[] = { 0xff, 0xd9 };
+       int pkt_type;
 
        if (data[0] == 0x5a) {
                /* Control Packet, after this came the header again,
@@ -1076,22 +1076,13 @@ static void sd_pkt_scan(struct gspca_dev *gspca_dev,
        }
        data += 2;
        len -= 2;
-       if (data[0] == 0xff && data[1] == 0xd8) {
-               /* extra bytes....., could be processed too but would be
-                * a waste of time, right now leave the application and
-                * libjpeg do it for ourserlves.. */
-               gspca_frame_add(gspca_dev, LAST_PACKET,
-                                       ffd9, 2);
-               gspca_frame_add(gspca_dev, FIRST_PACKET, data, len);
-               return;
-       }
-
-       if (data[len - 2] == 0xff && data[len - 1] == 0xd9) {
-               /* Just in case, i have seen packets with the marker,
-                * other's do not include it... */
-               len -= 2;
-       }
-       gspca_frame_add(gspca_dev, INTER_PACKET, data, len);
+       if (data[0] == 0xff && data[1] == 0xd8)
+               pkt_type = FIRST_PACKET;
+       else if (data[len - 2] == 0xff && data[len - 1] == 0xd9)
+               pkt_type = LAST_PACKET;
+       else
+               pkt_type = INTER_PACKET;
+       gspca_frame_add(gspca_dev, pkt_type, data, len);
 }
 
 

_______________________________________________
linuxtv-commits mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to