summaryrefslogtreecommitdiff
path: root/src/decoder/_flac_common.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-11-10 21:42:15 +0100
committerMax Kellermann <max@duempel.org>2009-11-10 21:42:15 +0100
commitb6a2ffd3d761c05fd7cd7fecfe470307b6a5ed15 (patch)
treeadad8c48fe7476b3cb9a47eb5888225830b302c6 /src/decoder/_flac_common.c
parent6a5f4651a12cfb624e723835b0c37f38ffb4ec64 (diff)
decoder/flac: added function flac_data_deinit()
Clean up tag and replay_gain_info there.
Diffstat (limited to 'src/decoder/_flac_common.c')
-rw-r--r--src/decoder/_flac_common.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/decoder/_flac_common.c b/src/decoder/_flac_common.c
index 2eaeb2449..578e73263 100644
--- a/src/decoder/_flac_common.c
+++ b/src/decoder/_flac_common.c
@@ -40,6 +40,16 @@ flac_data_init(struct flac_data *data, struct decoder * decoder,
data->tag = NULL;
}
+void
+flac_data_deinit(struct flac_data *data)
+{
+ if (data->replay_gain_info != NULL)
+ replay_gain_info_free(data->replay_gain_info);
+
+ if (data->tag != NULL)
+ tag_free(data->tag);
+}
+
static void
flac_find_float_comment(const FLAC__StreamMetadata *block,
const char *cmnt, float *fl, bool *found_r)