[FFmpeg-devel] [PATCH 1/2] avformat/file: Add a specialized url_check callback for pipe protocol

Michael Niedermayer michael at niedermayer.cc
Tue Aug 30 00:54:22 EEST 2022


On Mon, Aug 29, 2022 at 04:43:19PM +0200, Neil Roberts wrote:
> Using file_check for the pipe protocol doesn't make sense. For example,
> for a URL like “pipe:0” it would end up checking whether the “pipe:0”
> file exists. This patch instead makes it check the access modes on the
> corresponding file descriptor using fcntl.
> 
> Signed-off-by: Neil Roberts <bpeeluk at yahoo.co.uk>
> ---
>  libavformat/file.c | 40 +++++++++++++++++++++++++++++++++++++---
>  1 file changed, 37 insertions(+), 3 deletions(-)

breaks on mingw64

src/libavformat/file.c: In function ‘pipe_check’:
src/libavformat/file.c:411:24: error: implicit declaration of function ‘fcntl’; did you mean ‘rintl’? [-Werror=implicit-function-declaration]
     int status_flags = fcntl(fd, F_GETFL);
                        ^~~~~
                        rintl
src/libavformat/file.c:411:34: error: ‘F_GETFL’ undeclared (first use in this function)
     int status_flags = fcntl(fd, F_GETFL);
                                  ^~~~~~~
src/libavformat/file.c:411:34: note: each undeclared identifier is reported only once for each function it appears in
cc1: some warnings being treated as errors

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

There will always be a question for which you do not know the correct answer.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20220829/f56606e1/attachment.sig>


More information about the ffmpeg-devel mailing list