[Ffmpeg-devel] HTTP probing issue... [PATCH]

Michel Bardiaux mbardiaux
Wed Feb 28 14:02:49 CET 2007


Baptiste Coudurier wrote:
> Michel Bardiaux wrote:
>> Baptiste Coudurier wrote:
>>> Hi
>>>
>>> Michel Bardiaux wrote:
>>>> Baptiste Coudurier wrote:
>>>>> Ok, I dig svn and found out something. See patch attached.
>>>>> Basically http_seek returns -1 (like file_seek), and then url_fseek
>>>>> will
>>>>> return -1 instead of EPIPE, and that will make probing fail:
>>>>>
>>>>> if (url_fseek(pb, 0, SEEK_SET) == (offset_t)AVERROR(EPIPE)) {
>>>>>     url_fclose(pb);
>>>>>     if (url_fopen(pb, filename, URL_RDONLY) < 0) {
>>>>>
>>>>> Should probe check for negative ret, or url_fseek should return EPIPE ?
>>>>> I reestablished EPIPE ret.
>>>>>
>>>> Shouldnt it be ESPIPE rather than EPIPE?
>>>>
>>> man errno:
>>>
>>> EPIPE  Broken pipe (POSIX.1)
>>>
>> man errno:
>>
>> ESPIPE Invalid seek
>>
>> EPIPE happens when you write to a pipe already closed at the other end
>> (and you dont catch SIGPIPE). ESPIPE seems more likely for a seek
>> operation, no?
> 
> I would say yes, comments ?
> 
I have just had a quick look at all instances of EPIPE in lavf, and it 
seems that they should *all* be ESPIPE.

Greetings,
-- 
Michel Bardiaux
R&D Director
T +32 [0] 2 790 29 41
F +32 [0] 2 790 29 02
E mailto:mbardiaux at mediaxim.be

Mediaxim NV/SA
Vorstlaan 191 Boulevard du Souverain
Brussel 1160 Bruxelles
http://www.mediaxim.com/




More information about the ffmpeg-devel mailing list