Changing the types from boolean to guint due to the ++ operand used on
them, and only call JBUF_SIGNAL_QUEUE after settling down,
or else you end up signaling the waiting code in chain() for every buffer
pushed out.
RTPJitterBuffer *jbuf;
GMutex jbuf_lock;
- gboolean waiting_queue;
+ guint waiting_queue;
GCond jbuf_queue;
- gboolean waiting_timer;
+ guint waiting_timer;
GCond jbuf_timer;
gboolean waiting_event;
GCond jbuf_event;
JBUF_LOCK_CHECK (priv, flushing);
do {
result = handle_next_buffer (jitterbuffer);
- JBUF_SIGNAL_QUEUE (priv);
if (G_LIKELY (result == GST_FLOW_WAIT)) {
/* now wait for the next event */
+ JBUF_SIGNAL_QUEUE (priv);
JBUF_WAIT_EVENT (priv, flushing);
result = GST_FLOW_OK;
}