| 
				
				
					
				
				
				 | 
			
			 | 
			@@ -1777,69 +1777,3 @@ AVInputFormat sdp_demuxer = { | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    sdp_read_close, | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			}; | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			#endif | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			
  | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			#if CONFIG_REDIR_DEMUXER | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			/* dummy redirector format (used directly in av_open_input_file now) */ | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			static int redir_probe(AVProbeData *pd) | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			{ | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    const char *p; | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    p = pd->buf; | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    skip_spaces(&p); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    if (av_strstart(p, "http://", NULL) || | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			        av_strstart(p, "rtsp://", NULL)) | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			        return AVPROBE_SCORE_MAX; | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    return 0; | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			} | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			
  | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			static int redir_read_header(AVFormatContext *s, AVFormatParameters *ap) | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			{ | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    char buf[4096], *q; | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    int c; | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    AVFormatContext *ic = NULL; | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    ByteIOContext *f = s->pb; | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			
  | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    /* parse each URL and try to open it */ | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    c = url_fgetc(f); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    while (c != URL_EOF) { | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			        /* skip spaces */ | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			        for(;;) { | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			            if (!redir_isspace(c)) | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			                break; | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			            c = url_fgetc(f); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			        } | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			        if (c == URL_EOF) | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			            break; | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			        /* record url */ | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			        q = buf; | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			        for(;;) { | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			            if (c == URL_EOF || redir_isspace(c)) | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			                break; | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			            if ((q - buf) < sizeof(buf) - 1) | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			                *q++ = c; | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			            c = url_fgetc(f); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			        } | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			        *q = '\0'; | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			        //printf("URL='%s'\n", buf); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			        /* try to open the media file */ | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			        if (av_open_input_file(&ic, buf, NULL, 0, NULL) == 0) | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			            break; | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    } | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    if (!ic) | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			        return AVERROR(EIO); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			
  | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    *s = *ic; | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    url_fclose(f); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			
  | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    return 0; | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			} | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			
  | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			AVInputFormat redir_demuxer = { | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    "redir", | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    NULL_IF_CONFIG_SMALL("Redirector format"), | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    0, | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    redir_probe, | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    redir_read_header, | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    NULL, | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			    NULL, | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			}; | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			#endif |