keep nScanlineStride number sane

bff + valgrind

Change-Id: I255a052251a6a0f1e4005b9cfb3b6ce00c6653ee