decoder/flac: added function flac_data_deinit()

Clean up tag and replay_gain_info there.
This commit is contained in:
Max Kellermann
2009-11-10 21:42:15 +01:00
parent 6a5f4651a1
commit b6a2ffd3d7
4 changed files with 26 additions and 17 deletions

View File

@@ -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)