alac->uncompressed_bytes_buffer_b = malloc(alac->setinfo_max_samples_per_frame * 4);
}
+static void deallocate_buffers(alac_file *alac)
+{
+ free(alac->predicterror_buffer_a);
+ free(alac->predicterror_buffer_b);
+ alac->predicterror_buffer_a = NULL;
+ alac->predicterror_buffer_b = NULL;
+
+ free(alac->outputsamples_buffer_a);
+ free(alac->outputsamples_buffer_b);
+ alac->outputsamples_buffer_a = NULL;
+ alac->outputsamples_buffer_b = NULL;
+
+ free(alac->uncompressed_bytes_buffer_a);
+ free(alac->uncompressed_bytes_buffer_b);
+ alac->uncompressed_bytes_buffer_a = NULL;
+ alac->uncompressed_bytes_buffer_b = NULL;
+}
+
void alac_set_info(alac_file *alac, char *inputbuffer)
{
char *ptr = inputbuffer;
return newfile;
}
+void destroy_alac(alac_file *alac)
+{
+ if (!alac) return;
+ deallocate_buffers(alac);
+ free(alac);
+}
unsigned char *inbuffer,
void *outbuffer, int *outputsize);
void alac_set_info(alac_file *alac, char *inputbuffer);
+void destroy_alac(alac_file *alac);
#endif /* __ALAC__DECOMP_H */
raop_buffer_destroy(raop_buffer_t *raop_buffer)
{
if (raop_buffer) {
+ destroy_alac(raop_buffer->alac);
free(raop_buffer->buffer);
- free(raop_buffer->alac);
free(raop_buffer);
}
}