Allow output formats without any streams.

Required for future metadata format.

Originally committed as revision 26100 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Anton Khirnov
2010-12-27 07:46:44 +00:00
parent 18f1add31c
commit bb62d5c1f0
3 changed files with 4 additions and 3 deletions

View File

@@ -1990,7 +1990,7 @@ static int transcode(AVFormatContext **output_files,
nb_ostreams = 0;
for(i=0;i<nb_output_files;i++) {
os = output_files[i];
if (!os->nb_streams) {
if (!os->nb_streams && !(os->oformat->flags & AVFMT_NOSTREAMS)) {
dump_format(output_files[i], i, output_files[i]->filename, 1);
fprintf(stderr, "Output file #%d does not contain any stream\n", i);
ret = AVERROR(EINVAL);