GstMapInfo inmap;
gint bpf;
guint blocksize;
+ gboolean drop_buf = FALSE;
GstAggregatorPad *aggpad = GST_AGGREGATOR_PAD (pad);
if (pad->position >= pad->size) {
/* Buffer done, drop it */
gst_buffer_replace (&pad->buffer, NULL);
- gst_aggregator_pad_drop_buffer (aggpad);
+ drop_buf = TRUE;
}
GST_OBJECT_UNLOCK (pad);
+ if (drop_buf)
+ gst_aggregator_pad_drop_buffer (aggpad);
return;
}
pad->output_offset += pad->size / bpf;
/* Buffer done, drop it */
gst_buffer_replace (&pad->buffer, NULL);
- gst_aggregator_pad_drop_buffer (aggpad);
GST_OBJECT_UNLOCK (pad);
+ gst_aggregator_pad_drop_buffer (aggpad);
return;
}
if (pad->position == pad->size) {
/* Buffer done, drop it */
gst_buffer_replace (&pad->buffer, NULL);
- gst_aggregator_pad_drop_buffer (aggpad);
GST_DEBUG_OBJECT (pad, "Finished mixing buffer, waiting for next");
+ drop_buf = TRUE;
}
GST_OBJECT_UNLOCK (pad);
+
+ if (drop_buf)
+ gst_aggregator_pad_drop_buffer (aggpad);
}
static GstFlowReturn