]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
[media] uvcvideo: Fix empty packet statistic
authorKieran Bingham <kieran.bingham@ideasonboard.com>
Mon, 3 Apr 2017 11:25:32 +0000 (08:25 -0300)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Mon, 10 Apr 2017 10:41:27 +0000 (07:41 -0300)
The frame counters are inadvertently counting packets with content as
empty.

Fix it by correcting the logic expression

Fixes: 7bc5edb00bbd [media] uvcvideo: Extract video stream statistics
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/usb/uvc/uvc_video.c

index 07a6c833ef7b8bf1920937fb0c508f3a7942b9b9..128c0a7826cea55bc28a55af9a597ebf4165fd1f 100644 (file)
@@ -818,7 +818,7 @@ static void uvc_video_stats_decode(struct uvc_streaming *stream,
 
        /* Update the packets counters. */
        stream->stats.frame.nb_packets++;
-       if (len > header_size)
+       if (len <= header_size)
                stream->stats.frame.nb_empty++;
 
        if (data[1] & UVC_STREAM_ERR)