[FFmpeg-devel] [PATCH]Handle tmp on Android as on Win32
Carl Eugen Hoyos
cehoyos at ag.or.at
Sat Jun 11 22:44:18 CEST 2016
Hi!
Attached patch fixes ticket #5620 for me (the OP did not provide a testcase).
Carl Eugen
-------------- next part --------------
From 4c9d1c6f9a8f166703dc0333b53f5dba8dc5b414 Mon Sep 17 00:00:00 2001
From: Carl Eugen Hoyos <cehoyos at ag.or.at>
Date: Sat, 11 Jun 2016 22:41:18 +0200
Subject: [PATCH] lavu/file_open: Use current directory for temporary files
also on Android.
Fixes ticket #5620.
---
libavutil/file_open.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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);
--
1.7.10.4
More information about the ffmpeg-devel
mailing list