[FFmpeg-devel] url_exists function in avio.c opens instead of checking existence

alexandre.ferrieux at orange-ftgroup.com alexandre.ferrieux
Thu Jan 21 10:54:24 CET 2010

On 20/01/2010 21:24, Maker aka Michele wrote:
>> if ((ret = url_check(file, w) != AVERROR(ENOENT))  // the file exists
>>     ask_for_overwrite_confirmation();
> uhm, yeah, may a function like "url_check" isn't really like url_exists,
> but should be more useful.
> But my opinion is that a file shouldn't be opened if we just want to know if
> it is writable/readable. So, what about extending URLProtocol with a pointer
> to function,  which checks if the url can be opened in a certain mode
> (specific for each protocol)?

I think we can collectively stop running in circles around the issue, which is stored in roundup as issue 1663. Add 
comments there if you think there's something to add (beside implementing the suggested change).

> ps. I've also noticed that if ffmpeg takes a fifo file as input, it keeps
> reading and reading, waiting invain to reach the end. Is this a problem?

Please be precise. "Waiting in vain" is everything but a clear statement of what's happening.
What are the testing conditions ? What is written to the other side of the fifo ? When ? What side is opened first ?
What do you observe ? Does ffmpeg go to 100% CPU ? Does it block at 0% CPU ? Does it consume any input ? Does it write 
anything to stderr ?


This message and any attachments (the "message") are confidential and intended solely for the addressees. 
Any unauthorised use or dissemination is prohibited.
Messages are susceptible to alteration. 
France Telecom Group shall not be liable for the message if altered, changed or falsified.
If you are not the intended addressee of this message, please cancel it immediately and inform the sender.

More information about the ffmpeg-devel mailing list