seek-test: update to recent avformat api
This commit is contained in:
		
							parent
							
								
									813907d424
								
							
						
					
					
						commit
						d88e9f1c07
					
				@ -64,10 +64,10 @@ int main(int argc, char **argv)
 | 
				
			|||||||
    AVFormatContext *ic = NULL;
 | 
					    AVFormatContext *ic = NULL;
 | 
				
			||||||
    int i, ret, stream_id;
 | 
					    int i, ret, stream_id;
 | 
				
			||||||
    int64_t timestamp;
 | 
					    int64_t timestamp;
 | 
				
			||||||
    AVFormatParameters params, *ap= ¶ms;
 | 
					    AVDictionary *format_opts = NULL;
 | 
				
			||||||
    memset(ap, 0, sizeof(params));
 | 
					
 | 
				
			||||||
    ap->channels=1;
 | 
					    av_dict_set(&format_opts, "channels", "1", 0);
 | 
				
			||||||
    ap->sample_rate= 22050;
 | 
					    av_dict_set(&format_opts, "sample_rate", "22050", 0);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /* initialize libavcodec, and register all codecs and formats */
 | 
					    /* initialize libavcodec, and register all codecs and formats */
 | 
				
			||||||
    av_register_all();
 | 
					    av_register_all();
 | 
				
			||||||
@ -80,7 +80,7 @@ int main(int argc, char **argv)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    filename = argv[1];
 | 
					    filename = argv[1];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    ret = av_open_input_file(&ic, filename, NULL, 0, ap);
 | 
					    ret = avformat_open_input(&ic, filename, NULL, &format_opts);
 | 
				
			||||||
    if (ret < 0) {
 | 
					    if (ret < 0) {
 | 
				
			||||||
        fprintf(stderr, "cannot open %s\n", filename);
 | 
					        fprintf(stderr, "cannot open %s\n", filename);
 | 
				
			||||||
        exit(1);
 | 
					        exit(1);
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user