tmp = (size.bytes * 100) / sq->max_size.bytes;
percent = MAX (percent, tmp);
}
- percent = MIN (percent, 100);
}
if (mq->buffering) {
if (percent >= mq->high_percent) {
mq->buffering = FALSE;
}
+ /* make sure it increases */
+ percent = MAX (mq->percent, percent);
+
+ if (percent == mq->percent)
+ /* don't post if nothing changed */
+ post = FALSE;
+ else
+ /* else keep last value we posted */
+ mq->percent = percent;
} else {
if (percent < mq->low_percent) {
mq->buffering = TRUE;
+ mq->percent = percent;
post = TRUE;
}
}
gboolean use_buffering;
gint low_percent, high_percent;
gboolean buffering;
+ gint percent;
guint32 counter; /* incoming object counter, protected with STREAM_LOCK */
guint32 highid; /* contains highest id of last outputted object */