Commit 7357f6e6 authored by Anton Khirnov's avatar Anton Khirnov Committed by Michael Niedermayer

ffmpeg: don't segfault on 0 input files.

parent 6e675b50
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment