fix decoder so that ffmpeg does not crash, at least not right away