summaryrefslogtreecommitdiff
path: root/v4l2-apps/libv4l/libv4lconvert/processing/libv4lprocessing.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2009-09-17 11:17:44 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-09-17 11:17:44 -0300
commitee117cb21fc99d6d1ef141b62ac07c2c99ed6558 (patch)
treeb3109826151f5b2cacd01a2a78fc51079381fec7 /v4l2-apps/libv4l/libv4lconvert/processing/libv4lprocessing.c
parent3c34c6c8fa0c2f378cdad415e8f15c0938c28cb8 (diff)
parent26642526dd562aa77049bb56d5bf9ad64158c767 (diff)
downloadmediapointer-dvb-s2-ee117cb21fc99d6d1ef141b62ac07c2c99ed6558.tar.gz
mediapointer-dvb-s2-ee117cb21fc99d6d1ef141b62ac07c2c99ed6558.tar.bz2
merge: http://kernellabs.com/hg/~mkrufky/saa7164
From: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'v4l2-apps/libv4l/libv4lconvert/processing/libv4lprocessing.c')
-rw-r--r--v4l2-apps/libv4l/libv4lconvert/processing/libv4lprocessing.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/v4l2-apps/libv4l/libv4lconvert/processing/libv4lprocessing.c b/v4l2-apps/libv4l/libv4lconvert/processing/libv4lprocessing.c
index cbbcca73c..424173ec5 100644
--- a/v4l2-apps/libv4l/libv4lconvert/processing/libv4lprocessing.c
+++ b/v4l2-apps/libv4l/libv4lconvert/processing/libv4lprocessing.c
@@ -38,8 +38,10 @@ struct v4lprocessing_data *v4lprocessing_create(int fd, struct v4lcontrol_data*
struct v4lprocessing_data *data =
calloc(1, sizeof(struct v4lprocessing_data));
- if (!data)
+ if (!data) {
+ fprintf(stderr, "libv4lprocessing: error: out of memory!\n");
return NULL;
+ }
data->fd = fd;
data->control = control;
@@ -62,6 +64,8 @@ int v4lprocessing_pre_processing(struct v4lprocessing_data *data)
data->do_process = 1;
}
+ data->controls_changed |= v4lcontrol_controls_changed(data->control);
+
return data->do_process;
}
@@ -167,9 +171,10 @@ void v4lprocessing_processing(struct v4lprocessing_data *data,
return; /* Non supported pix format */
}
- if (v4lcontrol_controls_changed(data->control) ||
+ if (data->controls_changed ||
data->lookup_table_update_counter == V4L2PROCESSING_UPDATE_RATE) {
v4lprocessing_update_lookup_tables(data, buf, fmt);
+ data->controls_changed = 0;
data->lookup_table_update_counter = 0;
} else
data->lookup_table_update_counter++;