aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Khirnov <wyskas@gmail.com>2010-10-28 20:28:22 +0000
committerAnton Khirnov <wyskas@gmail.com>2010-10-28 20:28:22 +0000
commit63e856df0ac750dd4fefb6fc72ca4826ebdb5a0f (patch)
treeb13b16fce6e0637361d94e3894ea444e8028a8ce
parentac19f4a3e8114745b140b9fc3d8792e5aeaad695 (diff)
downloadffmpeg-63e856df0ac750dd4fefb6fc72ca4826ebdb5a0f.tar.gz
ffmpeg.c: dynamically allocate metadata maps
Originally committed as revision 25599 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--ffmpeg.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 3c92a26158..779986857d 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -124,7 +124,7 @@ static int nb_output_codecs = 0;
static AVStreamMap *stream_maps = NULL;
static int nb_stream_maps;
-static AVMetaDataMap meta_data_maps[MAX_FILES];
+static AVMetaDataMap *meta_data_maps = NULL;
static int nb_meta_data_maps;
/* indexed by output file stream index */
@@ -534,6 +534,7 @@ static int ffmpeg_exit(int ret)
av_free(input_codecs);
av_free(output_codecs);
av_free(stream_maps);
+ av_free(meta_data_maps);
av_free(video_codec_name);
av_free(audio_codec_name);
@@ -2873,8 +2874,10 @@ static void opt_map_meta_data(const char *arg)
AVMetaDataMap *m;
char *p;
- m = &meta_data_maps[nb_meta_data_maps++];
+ meta_data_maps = grow_array(meta_data_maps, sizeof(*meta_data_maps),
+ &nb_meta_data_maps, nb_meta_data_maps + 1);
+ m = &meta_data_maps[nb_meta_data_maps - 1];
m->out_file = strtol(arg, &p, 0);
if (*p)
p++;