[FFmpeg-devel] [PATCH 3/9] lavf/file: implement EXCL flag.

Reimar Döffinger Reimar.Doeffinger at gmx.de
Sat Apr 19 08:44:27 CEST 2014


On 16.04.2014, at 18:58, Nicolas George <george at nsup.org> wrote:
> 
> Signed-off-by: Nicolas George <george at nsup.org>
> ---
> libavformat/file.c |    7 +++++++
> 1 file changed, 7 insertions(+)
> 
> diff --git a/libavformat/file.c b/libavformat/file.c
> index 6511328..89437c7 100644
> --- a/libavformat/file.c
> +++ b/libavformat/file.c
> @@ -153,6 +153,10 @@ static int file_open(URLContext *h, const char *filename, int flags)
>     } else {
>         access = O_RDONLY;
>     }
> +#ifdef O_EXCL
> +    if ((access & O_CREAT) && (flags & AVIO_FLAG_EXCL))
> +        access |= O_EXCL;
> +#endif

Sorry for being too lazy to check the source, but maybe you know it:
Will this work on Windows?
If no, should we implement it?
If yes, isn't it confusing to default to non-exclusive even though the whole OS defaults to exclusive?


More information about the ffmpeg-devel mailing list