diff options
author | Paul B Mahol <onemda@gmail.com> | 2013-02-22 13:51:06 +0000 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2013-02-22 13:52:43 +0000 |
commit | c46400ddecab3a47e8f1aec9a405bbe2a321b06a (patch) | |
tree | 34f665573d8a1d58103cea0c69003248b71b1dda /libavformat/cafenc.c | |
parent | 21f68528e39db68fd3e22fef8f4783d19034dc1d (diff) | |
download | ffmpeg-c46400ddecab3a47e8f1aec9a405bbe2a321b06a.tar.gz |
cafenc: do not leak caf->pkt_sizes
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavformat/cafenc.c')
-rw-r--r-- | libavformat/cafenc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/cafenc.c b/libavformat/cafenc.c index 40ccd48c2d..11bb055965 100644 --- a/libavformat/cafenc.c +++ b/libavformat/cafenc.c @@ -238,11 +238,11 @@ static int caf_write_packet(AVFormatContext *s, AVPacket *pkt) static int caf_write_trailer(AVFormatContext *s) { + CAFContext *caf = s->priv_data; AVIOContext *pb = s->pb; AVCodecContext *enc = s->streams[0]->codec; if (pb->seekable) { - CAFContext *caf = s->priv_data; int64_t file_size = avio_tell(pb); avio_seek(pb, caf->data, SEEK_SET); @@ -256,11 +256,11 @@ static int caf_write_trailer(AVFormatContext *s) avio_wb32(pb, 0); ///< mPrimingFrames avio_wb32(pb, 0); ///< mRemainderFrames avio_write(pb, caf->pkt_sizes, caf->size_entries_used); - av_freep(&caf->pkt_sizes); caf->size_buffer_size = 0; } avio_flush(pb); } + av_freep(&caf->pkt_sizes); return 0; } |