summaryrefslogtreecommitdiff
path: root/src/android/jpeg/thumbnailer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/android/jpeg/thumbnailer.cpp')
-rw-r--r--src/android/jpeg/thumbnailer.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/android/jpeg/thumbnailer.cpp b/src/android/jpeg/thumbnailer.cpp
index 043c7b33..1fab8072 100644
--- a/src/android/jpeg/thumbnailer.cpp
+++ b/src/android/jpeg/thumbnailer.cpp
@@ -59,11 +59,12 @@ void Thumbnailer::createThumbnail(const FrameBuffer &source,
const unsigned int tw = targetSize.width;
const unsigned int th = targetSize.height;
+ ASSERT(frame.planes().size() == 2);
ASSERT(tw % 2 == 0 && th % 2 == 0);
/* Image scaling block implementing nearest-neighbour algorithm. */
- unsigned char *src = static_cast<unsigned char *>(frame.planes()[0].data());
- unsigned char *srcC = src + sh * sw;
+ unsigned char *src = frame.planes()[0].data();
+ unsigned char *srcC = frame.planes()[1].data();
unsigned char *srcCb, *srcCr;
unsigned char *dstY, *srcY;