V4L/DVB: tm6000: Be sure that the new buffer is empty
authorMauro Carvalho Chehab <mchehab@redhat.com>
Mon, 7 Jun 2010 15:32:27 +0000 (12:32 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Mon, 2 Aug 2010 17:06:01 +0000 (14:06 -0300)
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/staging/tm6000/tm6000-video.c

index 9a0b5a78c9579eeb73af55b7247ac941619277cf..fd36b36407c5747947edaa6d595bda28fc9837a9 100644 (file)
@@ -150,8 +150,6 @@ static inline void get_next_buf(struct tm6000_dmaqueue *dma_q,
 
        /* Cleans up buffer - Usefull for testing for frame/URB loss */
        outp = videobuf_to_vmalloc(&(*buf)->vb);
-//     if (outp)
-//             memset(outp, 0, (*buf)->vb.size);
 
        return;
 }
@@ -272,6 +270,7 @@ static int copy_streams(u8 *data, unsigned long len,
                                        voutp = videobuf_to_vmalloc (&vbuf->vb);
                                        if (!voutp)
                                                return rc;
+                                       memset(voutp, 0, vbuf->vb.size);
                                }
                                linewidth = vbuf->vb.width << 1;
                                pos = ((line << 1) - field - 1) * linewidth +