lavf: prevent crash in av_open_input_file() if ap == NULL.
Needed for proper behaviour in our old API compatibility code.
This commit is contained in:
		@@ -549,7 +549,7 @@ int av_open_input_file(AVFormatContext **ic_ptr, const char *filename,
 | 
				
			|||||||
    int err;
 | 
					    int err;
 | 
				
			||||||
    AVDictionary *opts = convert_format_parameters(ap);
 | 
					    AVDictionary *opts = convert_format_parameters(ap);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (!ap->prealloced_context)
 | 
					    if (!ap || !ap->prealloced_context)
 | 
				
			||||||
        *ic_ptr = NULL;
 | 
					        *ic_ptr = NULL;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    err = avformat_open_input(ic_ptr, filename, fmt, &opts);
 | 
					    err = avformat_open_input(ic_ptr, filename, fmt, &opts);
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user