libv4l2rds: handle V4L2_RDS_BLOCK_INVALID.
authorHans Verkuil <hans.verkuil@cisco.com>
Sat, 12 Jul 2014 07:28:50 +0000 (09:28 +0200)
committerHans Verkuil <hans.verkuil@cisco.com>
Sat, 12 Jul 2014 07:28:50 +0000 (09:28 +0200)
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 <hans.verkuil@cisco.com>
lib/libv4l2rds/libv4l2rds.c

index ac7adb2..24e113e 100644 (file)
@@ -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) {