aboutsummaryrefslogtreecommitdiffstats
path: root/src/chunk.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/chunk.h')
-rw-r--r--src/chunk.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/chunk.h b/src/chunk.h
index b63466102..2136c9349 100644
--- a/src/chunk.h
+++ b/src/chunk.h
@@ -65,6 +65,12 @@ music_chunk_init(struct music_chunk *chunk);
void
music_chunk_free(struct music_chunk *chunk);
+static inline bool
+music_chunk_is_empty(const struct music_chunk *chunk)
+{
+ return chunk->length == 0 && chunk->tag == NULL;
+}
+
/**
* Prepares appending to the music chunk. Returns a buffer where you
* may write into. After you are finished, call music_chunk_expand().