From d181de4cbd594ec4c283438f4fb3d2563106ae12 Mon Sep 17 00:00:00 2001 From: "hans@rhel5-devel.localdomain" Date: Tue, 26 May 2009 10:15:15 +0200 Subject: libv4l: fix a crash when doing processing on non rgb / bayer data From: Hans de Goede We were calling processing on the rotate90_src, but when doing single conversion and not doing rotate90 that was not pointing the buffer we should do the processing on (the converted data), but instead it was pointing to the original src buffer. Priority: normal Signed-off-by: Hans de Goede --- v4l2-apps/libv4l/libv4lconvert/libv4lconvert.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'v4l2-apps') diff --git a/v4l2-apps/libv4l/libv4lconvert/libv4lconvert.c b/v4l2-apps/libv4l/libv4lconvert/libv4lconvert.c index 58d77e5ef..1b95d0657 100644 --- a/v4l2-apps/libv4l/libv4lconvert/libv4lconvert.c +++ b/v4l2-apps/libv4l/libv4lconvert/libv4lconvert.c @@ -1008,13 +1008,13 @@ int v4lconvert_convert(struct v4lconvert_data *data, return res; src_size = my_src_fmt.fmt.pix.sizeimage; - } - /* We call processing here again in case the source format was not - rgb, but the dest is. v4lprocessing checks it self it only actually - does the processing once per frame. */ - if (processing) - v4lprocessing_processing(data->processing, rotate90_src, &my_src_fmt); + /* We call processing here again in case the source format was not + rgb, but the dest is. v4lprocessing checks it self it only actually + does the processing once per frame. */ + if (processing) + v4lprocessing_processing(data->processing, convert2_dest, &my_src_fmt); + } if (rotate90) v4lconvert_rotate90(rotate90_src, rotate90_dest, &my_src_fmt); -- cgit v1.2.3