using MPL for blink detection

Hello,

I am using the blink detection loop that I found in the Goldsmiths workshop that Joel and Arturo, which is using the MPL library, this is my detection loop (almost line by line from Arturo’s):

  
  
	blink.findBlinks(pixels, faces); // mpisearch.search(pixels, faces, 1);  
	if(faces.size() != 0) {  
		float maxSize=0;  
		while(!faces.empty( ))  
		{  
		  //Square face = faces.front();  
		  VisualObject* face = faces.front();  
			  
		  if(face->xSize>maxSize){  
			  fo = static_cast<FaceObject*>(face);  
			  maxSize=face->xSize;  
		  }  
  
		  faces.pop_front();  
	   } // while  
	} // if  
  

The problem is that I am running this loop twice, with two different camera feeds (I have two cameras and need to do blink detection on both). When I run the detection loop only once, it detects everything just fine, but if I run it twice on different feeds, it crashes on the faces.pop_front() line apparently. I am running on a single thread.

The update loop of my testApp.cpp looks like this:

  
  
	feed1.update();  
	feed1.detect();  
	  
	feed2.update();  
	feed2.detect();  
  

Where feedX.update() just updates the grabbed frame and detect() runs the blink detection loop above that calls the MPL library.

Is there anybody experienced with MPL that can maybe help with this?

Cheers,
Luis.