Commit 56f15d0b authored by Kieran Bingham's avatar Kieran Bingham Committed by Ben Hutchings

uvcvideo: Fix empty packet statistic

commit 360a3a90 upstream.

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

Fix it by correcting the logic expression

Fixes: 7bc5edb0 [media] uvcvideo: Extract video stream statistics
Signed-off-by: default avatarKieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
parent 3258429b
......@@ -810,7 +810,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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment