: Robustness against hacker attacks can be achieved by embedding watermarks within the quantization matrices of the MJPEG stream.
# Optional: Skip consecutive SOI (common in MJPEG streams) if pos + 1 < len(data) and data[pos] == 0xFF and data[pos+1] == 0xD8: pass # Correct, next frame starts mjpeg video sample verified