From 7c020e1ad37d27c9d5db4d714401f09c80e3cc44 Mon Sep 17 00:00:00 2001 From: Andrey Semashev Date: Sun, 2 Jun 2013 23:26:18 +0300 Subject: movenc: Grow the frag_info array in chunks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previously it was grown one element at a time, which leads to excessive reallocations. Bug-Id: 525 Signed-off-by: Martin Storsjö --- libavformat/movenc.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libavformat/movenc.h') diff --git a/libavformat/movenc.h b/libavformat/movenc.h index 103b918361..d15d69ccaa 100644 --- a/libavformat/movenc.h +++ b/libavformat/movenc.h @@ -26,6 +26,7 @@ #include "avformat.h" +#define MOV_FRAG_INFO_ALLOC_INCREMENT 64 #define MOV_INDEX_CLUSTER_SIZE 1024 #define MOV_TIMESCALE 1000 @@ -121,6 +122,7 @@ typedef struct MOVTrack { int nb_frag_info; MOVFragmentInfo *frag_info; + unsigned frag_info_capacity; struct { int64_t struct_offset; -- cgit v1.2.3