dcadec: add some logging before returning on error.

Based on a patch by Michael Niedermayer.