fix segfault when missing codec
bail out if no such codec