Check there is a stream before writing header.
Patch by Tomas Härdin: $(name) punto hardin chez codemill dot se Originally committed as revision 21186 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
		
							parent
							
								
									ef5e7fb253
								
							
						
					
					
						commit
						094a63f1f6
					
				@ -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];
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user