lavu/file_open: Use current directory for temporary files also on Android.
authorCarl Eugen Hoyos <cehoyos@ag.or.at>
Sat, 11 Jun 2016 20:41:18 +0000 (22:41 +0200)
committerCarl Eugen Hoyos <cehoyos@ag.or.at>
Sat, 11 Jun 2016 20:41:18 +0000 (22:41 +0200)
Fixes ticket #5620.

libavutil/file_open.c

index 6e58cc1..34070d9 100644 (file)
@@ -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);