[Ffmpeg-devel] HTTP probing issue...

Ryan Martell rdm4
Wed Feb 21 01:21:22 CET 2007


On Feb 20, 2007, at 6:09 PM, Ronald S. Bultje wrote:

> Hi Ryan,
>
> On Feb 20, 2007, Ryan Martell wrote:
>> The problem now is that when probing, it needs to open the file and
>> read data.  The probesize is 2048, which is fine.  It downloads the
>> entire asx file, which is only 218 bytes.  It then hangs, waiting for
>> more data.  I narrowed it down to tcp_read, in libavformat/tcp.c.
>
> I recently noticed something similar with local files (but didn't  
> look into it...), does that cause issues for you as well (i.e. just  
> playing a mp3 or ogg, or reading your asx)?
> If not, and you suspect it's related to my changes, do you still  
> see the issue when you remove the Range: %lld-\\r\n line from the  
> http request header in http.c (this effectively remove all effects  
> that my code may have)? If that fixes it, does it help if you  
> modify the line to read %lld-* or %lld-%lld (where the second is  
> the file length)?

No, I don't think it's related to your changes.  My patch fixes it,  
by respecting the data that the Content-Length and Content-Range  
return, and returning a 0 from http_read if all the data has been  
read.  I just don't understand how it was working before, but my  
version was about a month out of date, so who knows.

The problem with the rtsp redirector now is that all of the data from  
the url has been read, so the url_fgetc probably will immediately  
return EOF if the redirection was also a short file (like the asx  
files were).  To fix it for me, I just closed the file and reopened  
it in the asx_open() call.  I can make the change to the redirector  
code as well, but I would like someone to confirm it's a bug before i  
fix it!

-Ryan




More information about the ffmpeg-devel mailing list