Resolve unused variable warning.

- This unexpectedly changes bitstream, but as that makes no sense, it must be
  because some part of the program uses uninitialized memory.
Fix buffer overflow on copying of reference pixels.

- Valgrind noticed this.

- Shouldn't affect anything as the buffer overflowed to pixel buffers which
  were initialized later.