The disclosed invention is a method to detect candidate errors within the
picture start code, picture header, and picture timestamp. Upon detection,
these errors may be confirmed and the impacts mitigated. An error within
the timestamp bit field is adaptively detected by the use of a threshold
comparison, and a mechanism for concealing the timestamp information
leaves only a small timestamp anomaly. An error within the picture start
code (PSC) is determined by adaptively analyzing the number of bits and
the macro-block location of the next slice or GOB. If a PSC is suspected
to have been overrun due to an error, this method allows for data beyond
the first GOB or slice to be recovered in the frame. Depending on the
extent of use of slices and GOBs, the method can recover a majority of the
frame that otherwise would have been completely lost. A candidate error
within the picture header is evaluated by utilizing the first slice or GOB
of the frame and analyzing information from a previous frame to check
whether the current frame's header information should be replaced with the
previous frame's header information. Replacing the erred frame header can
result in a majority of the data within the frame being recovered that
would otherwise be discarded if the header was not replaced.