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

Maker aka Michele maker.py
Wed Jan 20 21:24:46 CET 2010


> 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)?

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?



More information about the ffmpeg-devel mailing list