# HG changeset patch # User benoit # Date 1263393168 0 # Node ID 9cc93fd4bb721cd0ef666d7e6e42a565a7757072 # Parent 2d0a0d3e5df145fb7b2d42559877900ea4988d35 Check there is a stream before writing header. Patch by Tomas H¸«£rdin: $(name) punto hardin chez codemill dot se diff -r 2d0a0d3e5df1 -r 9cc93fd4bb72 utils.c --- a/utils.c Tue Jan 12 16:36:23 2010 +0000 +++ b/utils.c Wed Jan 13 14:32:48 2010 +0000 @@ -2501,6 +2501,11 @@ AVStream *st; // some sanity checks + if (s->nb_streams == 0) { + av_log(s, AV_LOG_ERROR, "no streams\n"); + return -1; + } + for(i=0;inb_streams;i++) { st = s->streams[i];