# HG changeset patch # User bcoudurier # Date 1233400624 0 # Node ID f59a2165d0425c41684e15d71e666444aa3e916f # Parent bd49910ad4a06c2e9961ef07f666c7f2007ef186 free audio fifo diff -r bd49910ad4a0 -r f59a2165d042 mxfenc.c --- a/mxfenc.c Sat Jan 31 11:06:20 2009 +0000 +++ b/mxfenc.c Sat Jan 31 11:17:04 2009 +0000 @@ -901,6 +901,18 @@ return 0; } +static void ff_audio_interleave_close(AVFormatContext *s) +{ + int i; + for (i = 0; i < s->nb_streams; i++) { + AVStream *st = s->streams[i]; + AudioInterleaveContext *aic = st->priv_data; + + if (st->codec->codec_type == CODEC_TYPE_AUDIO) + av_fifo_free(&aic->fifo); + } +} + static int mxf_write_header(AVFormatContext *s) { MXFContext *mxf = s->priv_data; @@ -1009,6 +1021,9 @@ url_fseek(pb, 0, SEEK_SET); mxf_write_partition(s, 1, header_closed_partition_key, 1); } + + ff_audio_interleave_close(s); + mxf_free(s); return 0; }