avio_wl32(tta->seek_table, crc);
size = avio_close_dyn_buf(tta->seek_table, &ptr);
avio_write(s->pb, ptr, size);
+ tta->seek_table = NULL;
av_free(ptr);
/* Write audio data */
return 0;
}
+static void tta_deinit(AVFormatContext *s)
+{
+ TTAMuxContext *tta = s->priv_data;
+
+ ffio_free_dyn_buf(&tta->seek_table);
+ ff_packet_list_free(&tta->queue, &tta->queue_end);
+}
+
AVOutputFormat ff_tta_muxer = {
.name = "tta",
.long_name = NULL_IF_CONFIG_SMALL("TTA (True Audio)"),
.audio_codec = AV_CODEC_ID_TTA,
.video_codec = AV_CODEC_ID_NONE,
.init = tta_init,
+ .deinit = tta_deinit,
.write_header = tta_write_header,
.write_packet = tta_write_packet,
.write_trailer = tta_write_trailer,