From: Hans Verkuil Date: Sat, 12 Jul 2014 07:28:50 +0000 (+0200) Subject: libv4l2rds: handle V4L2_RDS_BLOCK_INVALID. X-Git-Tag: v4l-utils-1.3.90~120 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=db415e6699ad420e0da395b232e0bc7788063e5f;p=platform%2Fupstream%2Fv4l-utils.git libv4l2rds: handle V4L2_RDS_BLOCK_INVALID. This possible block value was not understood by libv4l2rds. This can happen if obsolete so-called 'E' blocks were received. This should never happen in practice, but it is still good to handle it, just in case. Signed-off-by: Hans Verkuil --- diff --git a/lib/libv4l2rds/libv4l2rds.c b/lib/libv4l2rds/libv4l2rds.c index ac7adb2..24e113e 100644 --- a/lib/libv4l2rds/libv4l2rds.c +++ b/lib/libv4l2rds/libv4l2rds.c @@ -1388,7 +1388,8 @@ uint32_t v4l2_rds_add(struct v4l2_rds *handle, struct v4l2_rds_data *rds_data) rds_stats->block_cnt++; /* check for corrected / uncorrectable errors in the data */ - if (rds_data->block & V4L2_RDS_BLOCK_ERROR) { + if ((rds_data->block & V4L2_RDS_BLOCK_ERROR) || + block_id == V4L2_RDS_BLOCK_INVALID) { block_id = -1; rds_stats->block_error_cnt++; } else if (rds_data->block & V4L2_RDS_BLOCK_CORRECTED) {