[FFmpeg-cvslog] ffmpeg: don't segfault on 0 input files.

Anton Khirnov git at videolan.org
Tue Aug 30 18:15:01 CEST 2011


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Tue Aug 30 04:22:06 2011 +0200| [7357f6e6787958a2b827c397ae46af12e55a2a55] | committer: Michael Niedermayer

ffmpeg: don't segfault on 0 input files.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7357f6e6787958a2b827c397ae46af12e55a2a55
---

 ffmpeg.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/ffmpeg.c b/ffmpeg.c
index 9859b9b..274bdc6 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -3863,7 +3863,7 @@ static int opt_output_file(const char *opt, const char *filename)
     }
 
     /* copy global metadata by default */
-    if (metadata_global_autocopy)
+    if (metadata_global_autocopy && nb_input_files)
         av_dict_copy(&oc->metadata, input_files[0].ctx->metadata,
                      AV_DICT_DONT_OVERWRITE);
     if (metadata_streams_autocopy)



More information about the ffmpeg-cvslog mailing list