pthread: don't increment index on zero-sized packets.

The next call to decode() will update from an invalid index, which will
either lead to a memcpy() where dest==src (2 threads), or lead to a
crash (>2 threads).

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
