Skip to content

Commit a1818c0

Browse files
committed
Create pos attribute
1 parent 54f9bef commit a1818c0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

virtio-snd.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,7 @@ typedef struct {
303303
typedef struct {
304304
void *addr; /* points to the guest OS buffer */
305305
uint32_t len;
306+
uint32_t pos; /* current position in this node */
306307
struct list_head q;
307308
} vsnd_buf_queue_node_t;
308309

@@ -929,6 +930,7 @@ static void __virtio_snd_frame_enqueue(void *payload,
929930
vsnd_buf_queue_node_t *node = malloc(sizeof(*node));
930931
node->addr = payload;
931932
node->len = n;
933+
node->pos = 0;
932934
list_push(&node->q, &props->buf_queue_head);
933935
#if WRITEOUT
934936
fwrite(node->addr, sizeof(void), node->len, outfile);

0 commit comments

Comments
 (0)