mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 11:50:43 +09:00
UPSTREAM: [media] uvcvideo: Fix empty packet statistic
The frame counters are inadvertently counting packets with content as empty. Fix it by correcting the logic expression Change-Id: I9e77fcebae2130f534dbac0932b405dd26e4033f 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> Signed-off-by: William Wu <william.wu@rock-chips.com> (cherry picked from commit360a3a90c6)
This commit is contained in:
committed by
Tao Huang
parent
60f2231020
commit
271ae75fec
@@ -821,7 +821,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)
|
||||
|
||||
Reference in New Issue
Block a user