ffmpeg: fix segfault with too many output files

Fixes Ticket219

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2011-06-04 01:24:00 +02:00
parent 33af5335fd
commit bfd3b70ac3

View File

@ -3863,6 +3863,11 @@ static void opt_output_file(const char *filename)
AVFormatParameters params, *ap = &params; AVFormatParameters params, *ap = &params;
AVOutputFormat *file_oformat; AVOutputFormat *file_oformat;
if(nb_output_files >= FF_ARRAY_ELEMS(output_files)){
fprintf(stderr, "Too many output files\n");
ffmpeg_exit(1);
}
if (!strcmp(filename, "-")) if (!strcmp(filename, "-"))
filename = "pipe:"; filename = "pipe:";