diff options
author | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2009-01-31 11:17:04 +0000 |
---|---|---|
committer | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2009-01-31 11:17:04 +0000 |
commit | 0646663882bec19351bcb23fb254092513b96988 (patch) | |
tree | 21848e9ff0ddba111e454208eec483f8ac2f39b4 | |
parent | 5efa932d2cab070c8bed874db126463c3e5821f8 (diff) | |
download | ffmpeg-0646663882bec19351bcb23fb254092513b96988.tar.gz |
free audio fifo
Originally committed as revision 16905 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavformat/mxfenc.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/libavformat/mxfenc.c b/libavformat/mxfenc.c index ba23a00e06..ab05e005af 100644 --- a/libavformat/mxfenc.c +++ b/libavformat/mxfenc.c @@ -901,6 +901,18 @@ static int ff_audio_interleave_init(AVFormatContext *s, const int *samples_per_f 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 @@ static int mxf_write_footer(AVFormatContext *s) 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; } |