improve error handling in video decoding a bit