Commit 4319057b authored by benoit's avatar benoit

Check there is a stream before writing header.

Patch by Tomas Härdin: $(name) punto hardin chez codemill dot se


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@21186 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 2b25f8dc
...@@ -2501,6 +2501,11 @@ int av_write_header(AVFormatContext *s) ...@@ -2501,6 +2501,11 @@ int av_write_header(AVFormatContext *s)
AVStream *st; AVStream *st;
// some sanity checks // some sanity checks
if (s->nb_streams == 0) {
av_log(s, AV_LOG_ERROR, "no streams\n");
return -1;
}
for(i=0;i<s->nb_streams;i++) { for(i=0;i<s->nb_streams;i++) {
st = s->streams[i]; st = s->streams[i];
......
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