To play a video stream which has errors, you will need error correction and/or error concealment, or decoding will simply fail as you have seen. Error correction first, and if the errors are not correctable, error concealment. The simplest possible way to handle uncorrectable data is to keep showing the last good frame, or show blank frames. Not pretty, but better than crashing.
After that it gets very complicated. I am not an expert in this topic! Perhaps look at existing open source decoders to see what they do.
|