This patch makes it safe to call the encode / decode functions with a NULL pointer in place of the pcm buffer.