Implemented state pattern in class FlvReader.