[FFmpeg-trac] #5620(avutil:open): av_tempfile failed to create file on android
FFmpeg
trac at avcodec.org
Sat Jun 11 20:17:25 CEST 2016
#5620: av_tempfile failed to create file on android
-------------------------------------+-------------------------------------
Reporter: chinshou | Owner:
Type: defect | Status: open
Priority: important | Component: avutil
Version: git-master | Resolution:
Keywords: android | Blocked By:
cache regression | Reproduced by developer: 1
Blocking: |
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Comment (by michael):
Replying to [comment:4 cehoyos]:
> The following works as expected:
> {{{
> diff --git a/libavutil/file_open.c b/libavutil/file_open.c
> index 6e58cc1..34070d9 100644
> --- a/libavutil/file_open.c
> +++ b/libavutil/file_open.c
> @@ -134,7 +134,7 @@ int avpriv_tempfile(const char *prefix, char
**filename, int log_offset, void *l
> #else
> snprintf(*filename, len, "/tmp/%sXXXXXX", prefix);
> fd = mkstemp(*filename);
> -#ifdef _WIN32
> +#if defined(_WIN32) || defined (__ANDROID__)
> if (fd < 0) {
> snprintf(*filename, len, "./%sXXXXXX", prefix);
> fd = mkstemp(*filename);
> }}}
please submit this to ffmpeg-devel if you agree that it is a acceptable
solution
--
Ticket URL: <https://trac.ffmpeg.org/ticket/5620#comment:5>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list