Further add a codecType check

Might help #5843