From 3b4feac1ec14f861bdd7f494f288f4d8dd7f449e Mon Sep 17 00:00:00 2001 From: Andrey Semashev Date: Sun, 2 Jun 2013 22:57:31 +0300 Subject: movenc: Keep track of the allocated size for the cluster array MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When writing fragmented mp4, the cluster array is reset when a fragment is written. Instead of starting off reallocating the array only based on the number of current elements in it, keep track of how many elements there were allocated earlier. This avoids reallocating this array needlessly when writing fragmented mp4 files. Bug-Id: 525 Signed-off-by: Martin Storsjö --- libavformat/movenc.h | 1 + 1 file changed, 1 insertion(+) (limited to 'libavformat/movenc.h') diff --git a/libavformat/movenc.h b/libavformat/movenc.h index 879c942a9f..2aa8ffb7e4 100644 --- a/libavformat/movenc.h +++ b/libavformat/movenc.h @@ -93,6 +93,7 @@ typedef struct MOVTrack { int vos_len; uint8_t *vos_data; MOVIentry *cluster; + unsigned cluster_capacity; int audio_vbr; int height; ///< active picture (w/o VBI) height for D-10/IMX uint32_t tref_tag; -- cgit v1.2.3