summaryrefslogtreecommitdiffstats
path: root/src/ufo-roof-buffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ufo-roof-buffer.c')
-rw-r--r--src/ufo-roof-buffer.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/ufo-roof-buffer.c b/src/ufo-roof-buffer.c
index bac940c..32598c9 100644
--- a/src/ufo-roof-buffer.c
+++ b/src/ufo-roof-buffer.c
@@ -139,7 +139,7 @@ gboolean ufo_roof_buffer_set_fragment(UfoRoofBuffer *buffer, guint stream_id, gu
-gboolean ufo_roof_buffer_get_dataset(UfoRoofBuffer *buffer, gpointer output_buffer, GError **error) {
+gboolean ufo_roof_buffer_get_dataset(UfoRoofBuffer *buffer, gpointer output_buffer, gulong *seqid, GError **error) {
guint buffer_id = buffer->current_id % buffer->ring_size;
void *dataset_buffer = buffer->ring_buffer + buffer_id * buffer->dataset_size;
@@ -147,9 +147,10 @@ gboolean ufo_roof_buffer_get_dataset(UfoRoofBuffer *buffer, gpointer output_buff
if (buffer->n_fragments[buffer_id] < buffer->fragments_per_dataset) return FALSE;
memcpy(output_buffer, dataset_buffer, buffer->dataset_size);
+ if (seqid) *seqid = buffer->current_id;
buffer->n_fragments[buffer_id] = 0;
buffer->current_id += 1;
- return TRUE;
+ return TRUE;
}