OSDN Git Service

prefer avio_check() over url_exist()
authorStefano Sabatini <stefano.sabatini-lala@poste.it>
Fri, 8 Apr 2011 23:32:37 +0000 (01:32 +0200)
committerAnton Khirnov <anton@khirnov.net>
Tue, 19 Apr 2011 17:48:07 +0000 (19:48 +0200)
commit55815edca038997ec283569a192a3eca7f2143bc
tree6c3910611d7f68cd049c4b66a57c525d0de86aee
parent59d96941f0285a501989d5f2c9b69be0a1393ed5
prefer avio_check() over url_exist()

The problem with url_exist() is that it tries to open a resource in
RDONLY mode. If the file is a FIFO and there is already a reading
client, the open() call will hang.

By using avio_check() with access mode of 0, the second reading
process will check if the file exists without attempting to open it,
thus avoiding the lock.

Fix issue #1663.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
ffmpeg.c
ffserver.c
libavformat/img2.c