* [PATCH] uvcvideo: Fix empty packet statistic
@ 2017-04-03 11:25 Kieran Bingham
2017-04-03 16:10 ` Laurent Pinchart
0 siblings, 1 reply; 2+ messages in thread
From: Kieran Bingham @ 2017-04-03 11:25 UTC (permalink / raw)
To: laurent.pinchart; +Cc: linux-media, Kieran Bingham
From: Kieran Bingham <kieran.bingham@ideasonboard.com>
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>
---
drivers/media/usb/uvc/uvc_video.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/usb/uvc/uvc_video.c b/drivers/media/usb/uvc/uvc_video.c
index 075a0fe77485..7777ed24908b 100644
--- a/drivers/media/usb/uvc/uvc_video.c
+++ b/drivers/media/usb/uvc/uvc_video.c
@@ -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)
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] uvcvideo: Fix empty packet statistic
2017-04-03 11:25 [PATCH] uvcvideo: Fix empty packet statistic Kieran Bingham
@ 2017-04-03 16:10 ` Laurent Pinchart
0 siblings, 0 replies; 2+ messages in thread
From: Laurent Pinchart @ 2017-04-03 16:10 UTC (permalink / raw)
To: Kieran Bingham; +Cc: linux-media, Kieran Bingham
Hi Kieran,
Thank you for the patch.
On Monday 03 Apr 2017 12:25:32 Kieran Bingham wrote:
> From: Kieran Bingham <kieran.bingham@ideasonboard.com>
>
> 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>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
and applied to my tree.
> ---
> drivers/media/usb/uvc/uvc_video.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/media/usb/uvc/uvc_video.c
> b/drivers/media/usb/uvc/uvc_video.c index 075a0fe77485..7777ed24908b 100644
> --- a/drivers/media/usb/uvc/uvc_video.c
> +++ b/drivers/media/usb/uvc/uvc_video.c
> @@ -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)
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-04-03 16:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-03 11:25 [PATCH] uvcvideo: Fix empty packet statistic Kieran Bingham
2017-04-03 16:10 ` Laurent Pinchart
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox