summaryrefslogtreecommitdiff
path: root/src/lib/image.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2013-08-23 15:33:45 +0100
committerCarl Hetherington <cth@carlh.net>2013-08-23 15:33:45 +0100
commit97890961be41534b5aae058017d7d65a44d7d0fb (patch)
treead4e6623d699b6da52df4844279907cd86186c09 /src/lib/image.cc
parentd6be9f27147113dc6355ed0de7c99d1312aaeebd (diff)
Try to fix problems with odd crop values and YUV.
Diffstat (limited to 'src/lib/image.cc')
-rw-r--r--src/lib/image.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/image.cc b/src/lib/image.cc
index 5c04f70e6..f9a42f93b 100644
--- a/src/lib/image.cc
+++ b/src/lib/image.cc
@@ -420,7 +420,7 @@ Image::allocate ()
_stride[0] = _stride[1] = _stride[2] = _stride[3] = 0;
for (int i = 0; i < components(); ++i) {
- _line_size[i] = _size.width * bytes_per_pixel(i);
+ _line_size[i] = ceil (_size.width * bytes_per_pixel(i));
_stride[i] = stride_round_up (i, _line_size, _aligned ? 32 : 1);
_data[i] = (uint8_t *) av_malloc (_stride[i] * lines (i));
}