summaryrefslogtreecommitdiff
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorAnton Khirnov <wyskas@gmail.com>2010-11-08 06:47:41 +0000
committerAnton Khirnov <wyskas@gmail.com>2010-11-08 06:47:41 +0000
commit7b3937360efd16ae87fa44fc4633a74913b5ac4d (patch)
treeccb0de0964c434e59a226b2e7254a18b1647f9ee /ffmpeg.c
parent1e80a0eaa4905aa043690f715843f9c01dfea913 (diff)
ffmpeg.c: allow using negative file indices to disable metadata copying
Originally committed as revision 25706 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index fc1d52bfd7..b1cdf1c7be 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -2346,6 +2346,8 @@ static int transcode(AVFormatContext **output_files,
int out_file_index = meta_data_maps[i][0].file;
int in_file_index = meta_data_maps[i][1].file;
+ if (in_file_index < 0 || out_file_index < 0)
+ continue;
METADATA_CHECK_INDEX(out_file_index, nb_output_files, "output file")
METADATA_CHECK_INDEX(in_file_index, nb_input_files, "input file")