[FFmpeg-devel] [PATCH] av_tempfile: use avpriv_open()

Hendrik Leppkes h.leppkes at gmail.com
Thu Aug 8 21:45:49 CEST 2013


On Thu, Aug 8, 2013 at 9:38 PM, Michael Niedermayer <michaelni at gmx.at> wrote:
> Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> ---
>  libavutil/file.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavutil/file.c b/libavutil/file.c
> index 8d03534..7e762dc 100644
> --- a/libavutil/file.c
> +++ b/libavutil/file.c
> @@ -188,7 +188,7 @@ int av_tempfile(const char *prefix, char **filename, int log_offset, void *log_c
>  #   ifndef O_EXCL
>  #       define O_EXCL 0
>  #   endif
> -    fd = open(*filename, O_RDWR | O_BINARY | O_CREAT | O_EXCL, 0600);
> +    fd = avpriv_open(*filename, O_RDWR | O_BINARY | O_CREAT | O_EXCL, 0600);
>  #else
>      snprintf(*filename, len, "/tmp/%sXXXXXX", prefix);
>      fd = mkstemp(*filename);
> --
> 1.7.9.5
>

Personally i would delay the adoption of avpriv_open a bit since the
whole concept is flawed and caused this:
http://fate.ffmpeg.org/report.cgi?time=20130808145715&slot=x86_32-msvc10-dll-windows-native

In the end, it might end up being changed again, so waiting a bit cannot hurt.


More information about the ffmpeg-devel mailing list