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

Baptiste Coudurier baptiste.coudurier
Wed Feb 28 13:53:57 CET 2007


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 ?

-- 
Baptiste COUDURIER                              GnuPG Key Id: 0x5C1ABAAA
SMARTJOG S.A.                                    http://www.smartjog.com
Key fingerprint                 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
Phone: +33 1 49966312




More information about the ffmpeg-devel mailing list