Avoid a deadlock when decoding wma.

Fixes ticket #2925.