fixed segfault when decoding audio