diff options
author | XANTRONIX Development | 2022-03-10 15:29:16 -0500 |
---|---|---|
committer | XANTRONIX Development | 2022-03-10 15:29:16 -0500 |
commit | 906c5afd82dd289ba3af285acca5b9a8b1cf8e1c (patch) | |
tree | f9ee0f66c40030ac81dd6b6c9b25f5876b1d6914 | |
parent | 316ab6ba76addc02a229c1a852182be55df29307 (diff) | |
download | xas-906c5afd82dd289ba3af285acca5b9a8b1cf8e1c.tar.gz xas-906c5afd82dd289ba3af285acca5b9a8b1cf8e1c.tar.bz2 xas-906c5afd82dd289ba3af285acca5b9a8b1cf8e1c.zip |
Ensure ev->next is NULL by default
-rw-r--r-- | src/seq.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -48,6 +48,8 @@ static int event_add(xas_seq *seq, xas_seq_event *ev) { seq->last = ev; } + ev->next = NULL; + return 0; } @@ -612,6 +614,10 @@ int xas_seq_play(xas_seq *seq, xas_audio_stream *sink) { goto error_event_trigger; } + if (ev->next == NULL) { + goto done; + } + ev = ev->next; } @@ -630,6 +636,7 @@ int xas_seq_play(xas_seq *seq, xas_audio_stream *sink) { frame++; } +done: xas_audio_stream_destroy(source); return frame * buffer_size; |