- if (frame != -1) {
- QPixmap pix = QPixmap::fromImage(getFrame(m_producer, frame, twidth, theight));
- emit thumbReady(frame, pix);
- }
- if (frame2 != -1) {
- QPixmap pix = QPixmap::fromImage(getFrame(m_producer, frame2, twidth, theight));
- emit thumbReady(frame2, pix);
+ while (!m_requestedThumbs.isEmpty()) {
+ int frame = m_requestedThumbs.takeFirst();
+ if (frame != -1) {
+ QImage img = getFrame(m_producer, frame, twidth, theight);
+ emit thumbReady(frame, img);
+ }