[FFmpeg-cvslog] r21186 - trunk/libavformat/utils.c
benoit
subversion
Wed Jan 13 15:32:48 CET 2010
Author: benoit
Date: Wed Jan 13 15:32:48 2010
New Revision: 21186
Log:
Check there is a stream before writing header.
Patch by Tomas H?rdin: $(name) punto hardin chez codemill dot se
Modified:
trunk/libavformat/utils.c
Modified: trunk/libavformat/utils.c
==============================================================================
--- trunk/libavformat/utils.c Wed Jan 13 05:35:19 2010 (r21185)
+++ trunk/libavformat/utils.c Wed Jan 13 15:32:48 2010 (r21186)
@@ -2501,6 +2501,11 @@ int av_write_header(AVFormatContext *s)
AVStream *st;
// 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++) {
st = s->streams[i];
More information about the ffmpeg-cvslog
mailing list