Commit 4c9d1c6f authored by Carl Eugen Hoyos's avatar Carl Eugen Hoyos

lavu/file_open: Use current directory for temporary files also on Android.

Fixes ticket #5620.
parent 3da860fb
...@@ -134,7 +134,7 @@ int avpriv_tempfile(const char *prefix, char **filename, int log_offset, void *l ...@@ -134,7 +134,7 @@ int avpriv_tempfile(const char *prefix, char **filename, int log_offset, void *l
#else #else
snprintf(*filename, len, "/tmp/%sXXXXXX", prefix); snprintf(*filename, len, "/tmp/%sXXXXXX", prefix);
fd = mkstemp(*filename); fd = mkstemp(*filename);
#ifdef _WIN32 #if defined(_WIN32) || defined (__ANDROID__)
if (fd < 0) { if (fd < 0) {
snprintf(*filename, len, "./%sXXXXXX", prefix); snprintf(*filename, len, "./%sXXXXXX", prefix);
fd = mkstemp(*filename); fd = mkstemp(*filename);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment