[media] uvcvideo: Fix empty packet statistic

The frame counters are inadvertently counting packets with content as
empty.

Fix it by correcting the logic expression

Fixes: 7bc5edb00b [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>
This commit is contained in:
Kieran Bingham 2017-04-03 08:25:32 -03:00 committed by Mauro Carvalho Chehab
parent f098268bd6
commit 360a3a90c6
1 changed files with 1 additions and 1 deletions

View 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)